Moved header generation scripts to utils. Added astyle config.
This commit is contained in:
20
utils/updateheaders.sh
Executable file
20
utils/updateheaders.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
FILES=`find common/ emulator/ discovery/ -name "*.c" -or -name "*.h" -or -name "*.cpp" | grep -v libs | grep -v /pixy/`
|
||||
|
||||
|
||||
for FILE in $FILES; do
|
||||
echo "Adding Header to $FILE"
|
||||
|
||||
#remove old header, and format file with astyle
|
||||
CONTENT=$(perl -0777 -pe 's%^/\*.*?discoverpixy.*?\*/%%igs' $FILE | astyle --options=./utils/style.astylerc)
|
||||
|
||||
#add new header
|
||||
./utils/genheader.sh $FILE > $FILE
|
||||
|
||||
#append file content
|
||||
echo "$CONTENT" >> $FILE
|
||||
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user