diff --git a/scripts/format_code.sh b/scripts/format_code.sh old mode 100755 new mode 100644 index d4c30e020..727b19436 --- a/scripts/format_code.sh +++ b/scripts/format_code.sh @@ -2,22 +2,23 @@ ASTYLE=`which astyle` -if [ ! -x $ASTYLE ]; + if [ ! -x $ASTYLE ]; + then - echo "No astyle found in path, please install." - exit 1 +echo "No astyle found in path, please install." +exit 1 fi if [ $# -le 0 ]; then - echo "Usage:" - echo "\t$0 [ ...]" +echo "Usage:" +echo "\t$0 [ ...]" # echo "\t$0 -r " - exit 2 +exit 2 fi $ASTYLE --lineend=linux --mode=c --indent=force-tab=4 --brackets=linux --pad-header \ - --indent-switches --indent-cases --indent-preprocessor \ - --indent-col1-comments --delete-empty-lines --break-closing-brackets \ - --align-pointer=name --indent-labels --brackets=break \ - --unpad-paren --break-blocks $@ -exit $? + --indent-switches --indent-cases --indent-preprocessor \ + --indent-col1-comments --delete-empty-lines --break-closing-brackets \ + --align-pointer=type --indent-labels --brackets=break \ + --unpad-paren --break-blocks $@ + exit $?