summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 13:40:55 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-11 13:40:55 -0600
commit8c91b5f0887dd5c12acee12c2119e389944a6ac3 (patch)
tree77a23dee159ec6d69022b48251d60e6cc8cf17e2
parent2f8d755a1dd65173e81b68ed9f05d4d49e33f164 (diff)
downloadscripts-8c91b5f0887dd5c12acee12c2119e389944a6ac3.tar.gz
scripts-8c91b5f0887dd5c12acee12c2119e389944a6ac3.zip
Add astyle options
-rw-r--r--astyle/beautify_source_tree24
-rw-r--r--astyle/tde_astylerc14
2 files changed, 38 insertions, 0 deletions
diff --git a/astyle/beautify_source_tree b/astyle/beautify_source_tree
new file mode 100644
index 0000000..b604d60
--- /dev/null
+++ b/astyle/beautify_source_tree
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if [[ $1 == "" ]]; then
+ echo "Please specify the source directory to beautify"
+ 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
diff --git a/astyle/tde_astylerc b/astyle/tde_astylerc
new file mode 100644
index 0000000..3eff9ec
--- /dev/null
+++ b/astyle/tde_astylerc
@@ -0,0 +1,14 @@
+--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