Added script to automatically format all changed .c and .h files.
This commit is contained in:
parent
a15df299e9
commit
a145c4201f
10
scripts/autoformat.sh
Executable file
10
scripts/autoformat.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
CHANGESET=`git status | cut -d ':' -f 2 | grep -vE "#|no" | grep -E "*\.h|*\.c"` # get filenames from git status
|
||||
|
||||
for f in $CHANGESET; do
|
||||
if [ -e $f ]; then
|
||||
sh $MY_PATH/format_code.sh $f
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user