updating license script

This commit is contained in:
maliakal_d 2021-10-14 18:03:19 +02:00
parent 2d7ffdd603
commit 0801957203
2 changed files with 22 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#require 2 arguments, API_NAME API_DIR (relative to package)
if [ $# -lt 2 ]; then
echo "Wrong usage of updateVersion.sh. Requires atleast 2 arguments [API_NAME, API_DIR]"
exit -1
return -1
fi
API_NAME=$1

View File

@ -1,5 +1,23 @@
#!/bin/bash
for file in $(find . -name "*.h"); do
WD=$PWD
LICENCE_NOTICE_FILE=$WD/notice_to_add_for_every_file
if [ $# -lt 1 ]; then
echo "Wrong usage of updateLicenseNotice.sh. Requires atleast 1 argument [RELATIVE PATH]"
return -1
fi
CURRENT=$WD/$1
if [ ! -d "$CURRENT" ]; then
echo "This directory ${CURRENT} does not exist"
return -1
fi
cd CURRENT
for file in $(find $CURRENT -name "*.h"); do
echo Processing $file
cat notice_to_add_for_every_file $file > $file.modified
@ -7,3 +25,5 @@ for file in $(find . -name "*.h"); do
mv $file.modified $file
done
cd $WD