2016-04-05 18:07:45 +03:00
|
|
|
#!/bin/bash
|
2014-08-19 20:25:37 +04:00
|
|
|
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
|