summaryrefslogtreecommitdiff
path: root/other/astyle
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-08-19 23:36:49 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-08-20 00:39:18 +0100
commitc597f670127c3e6980145647b5e5168058a137eb (patch)
treefa88a454996131427baed05f13b1e14bf314ff19 /other/astyle
parent0e18966a2703d67ac4647832fca595286d8e3568 (diff)
Add format-source script.
This is easier to use from a precommit hook, so it can be used to ensure that all formatting is correct before committing code.
Diffstat (limited to 'other/astyle')
-rwxr-xr-xother/astyle/format-source9
1 files changed, 9 insertions, 0 deletions
diff --git a/other/astyle/format-source b/other/astyle/format-source
new file mode 100755
index 00000000..4d4b111c
--- /dev/null
+++ b/other/astyle/format-source
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3if [ -z "$ASTYLE" ]; then
4 ASTYLE=astyle
5fi
6
7SOURCES=`find . -name "*.[ch]" -and -not -name "*.in.*" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"`
8
9$ASTYLE --options=other/astyle/astylerc $SOURCES