summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-02-10 09:30:41 +0000
committerTom Hacohen <tom@stosb.com>2014-02-10 09:30:41 +0000
commitc1c27829e426767967ea65c10da68c4e28c6c390 (patch)
tree79a8a6a894b5b64035f8e60ed11ca307a01c5355
parente6d28de18c08c80a5bc11359890631e494eeca6e (diff)
Added a readme, and 2 helper scripts.HEADmaster
-rw-r--r--README5
-rwxr-xr-xcformat.sh4
-rwxr-xr-xhformat.sh4
3 files changed, 13 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..ba19361
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
1Install ecrustify
2Make sure ecrustify is in path
3run:
4find <project dir> -iname '*.c' | xargs ./cformat.sh
5find <project dir> -iname '*.h' | xargs ./hformat.sh
diff --git a/cformat.sh b/cformat.sh
new file mode 100755
index 0000000..1c0727d
--- /dev/null
+++ b/cformat.sh
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3ecrustify -c ./ecrustify.cfg --replace $@
4sed -i 's/FOREACH (/FOREACH(/g;s/FREE (/FREE(/g;s/FOREACH_SAFE (/FOREACH_SAFE(/g' $@
diff --git a/hformat.sh b/hformat.sh
new file mode 100755
index 0000000..c3a33a7
--- /dev/null
+++ b/hformat.sh
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3ecrustify -c ./ecrustify-headers.cfg --replace $@
4sed -i 's/FOREACH (/FOREACH(/g;s/FREE (/FREE(/g;s/FOREACH_SAFE (/FOREACH_SAFE(/g' $@