Warning, file /sdk/elf-dissector/add_license.sh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #!/bin/bash
0003 find "$@" -name '*.h' -o -name '*.cpp' -o -name '*.qml' -o -name '*.c' | grep -v /3rdparty/ | grep -v /build | while read FILE; do
0004     if grep -qiE "Copyright \(C\) [0-9, -]{4,} " "$FILE" ; then continue; fi
0005     thisfile=`basename $FILE`
0006     authorName=`git config user.name`
0007     authorEmail=`git config user.email`
0008     thisYear=`date +%Y`
0009     cat <<EOF > "$FILE".tmp
0010 /*
0011     Copyright (C) $thisYear $authorName <$authorEmail>
0013     This program is free software; you can redistribute it and/or modify it
0014     under the terms of the GNU Library General Public License as published by
0015     the Free Software Foundation; either version 2 of the License, or (at your
0016     option) any later version.
0018     This program is distributed in the hope that it will be useful, but WITHOUT
0019     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0020     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
0021     License for more details.
0023     You should have received a copy of the GNU General Public License
0024     along with this program.  If not, see <https://www.gnu.org/licenses/>.
0025 */
0027 EOF
0028     cat "$FILE" >> "$FILE".tmp
0029     mv "$FILE".tmp "$FILE"
0030 done