Added scripts to update/create file headers

This commit is contained in:
t-moe
2015-05-10 14:15:28 +02:00
parent 790f60269a
commit f332364a44
2 changed files with 34 additions and 0 deletions

15
genheader.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
echo "/**************************************************************************************************************************************"
echo "* Project: discoverpixy"
echo "* Authors: Aaron Schmocker, Timo Lang"
echo "* Institution: BFH Bern University of Applied Sciences"
echo "* File: $1"
echo "*"
echo "* Version History:"
echo "* Date Autor Email SHA Changes"
git log --pretty=format:"* %ad%x09%ae%x09%h%x09%s" --date=short --date-order --no-merges --reverse $1 | grep -v -i "fileheader"
echo "*"
echo "**************************************************************************************************************************************/"

19
updateheaders.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/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
CONTENT=$(perl -0777 -pe 's%^/\*.*?discoverpixy.*?\*/%%igs' $FILE)
#add new header
./genheader.sh $FILE > $FILE
#append file content
echo "$CONTENT" >> $FILE
done