summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 14:04:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 14:04:15 -0600
commite36ec8151f9b129fc0def7c8217e72b440c51dcb (patch)
tree43da8e255741cc77972843cc9c065fff7bf284a4
parent8c91b5f0887dd5c12acee12c2119e389944a6ac3 (diff)
downloadscripts-e36ec8151f9b129fc0def7c8217e72b440c51dcb.tar.gz
scripts-e36ec8151f9b129fc0def7c8217e72b440c51dcb.zip
Fix script
-rwxr-xr-x[-rw-r--r--]astyle/beautify_source_tree39
1 files changed, 22 insertions, 17 deletions
diff --git a/astyle/beautify_source_tree b/astyle/beautify_source_tree
index b604d60..0628a8e 100644..100755
--- a/astyle/beautify_source_tree
+++ b/astyle/beautify_source_tree
@@ -5,20 +5,25 @@ if [[ $1 == "" ]]; then
exit 1
fi
-astyle \
---indent=tab \
---indent-classes \
---indent-switches \
---indent-cases \
---indent-namespaces \
---indent-labels\ \
---indent-col1-comments \
- \
---unpad-paren \
- \
---style=java \
---add-brackets \
---break-closing-brackets \
---keep-one-line-statements \
- \
---recursive $1/*.c $1/*.cc $1/*.cpp $1/*.h
+ASTYLEARGS=$( cat <<EOF
+--indent=tab \
+--indent-classes \
+--indent-switches \
+--indent-cases \
+--indent-namespaces \
+--indent-labels \
+--indent-col1-comments \
+ \
+--unpad-paren \
+ \
+--style=java \
+--add-brackets \
+--break-closing-brackets \
+--keep-one-line-statements
+EOF
+)
+
+astyle $ASTYLEARGS --recursive $1/*.c || true
+astyle $ASTYLEARGS --recursive $1/*.cc || true
+astyle $ASTYLEARGS --recursive $1/*.cpp || true
+astyle $ASTYLEARGS --recursive $1/*.h || true