tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/formatting.git/commit/?id=c1c27829e426767967ea65c10da68c4e28c6c390

commit c1c27829e426767967ea65c10da68c4e28c6c390
Author: Tom Hacohen <[email protected]>
Date:   Mon Feb 10 09:30:41 2014 +0000

    Added a readme, and 2 helper scripts.
---
 README     | 5 +++++
 cformat.sh | 4 ++++
 hformat.sh | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/README b/README
new file mode 100644
index 0000000..ba19361
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
+Install ecrustify
+Make sure ecrustify is in path
+run:
+find <project dir> -iname '*.c' | xargs ./cformat.sh
+find <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 @@
+#!/bin/sh
+
+ecrustify -c ./ecrustify.cfg --replace $@
+sed -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 @@
+#!/bin/sh
+
+ecrustify -c ./ecrustify-headers.cfg --replace $@
+sed -i 's/FOREACH (/FOREACH(/g;s/FREE (/FREE(/g;s/FOREACH_SAFE 
(/FOREACH_SAFE(/g' $@

-- 


Reply via email to