diff options
Diffstat (limited to 'other')
-rwxr-xr-x | other/astyle/format-source | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/other/astyle/format-source b/other/astyle/format-source index 5b61273a..5b560622 100755 --- a/other/astyle/format-source +++ b/other/astyle/format-source | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e | 3 | set -ex |
4 | 4 | ||
5 | SOURCE_DIR="$1" | 5 | SOURCE_DIR="$1" |
6 | ASTYLE="$2" | 6 | ASTYLE="$2" |
@@ -47,12 +47,14 @@ if grep '<unresolved>' */*.h; then | |||
47 | exit 1 | 47 | exit 1 |
48 | fi | 48 | fi |
49 | 49 | ||
50 | SOURCES=`find . \ | 50 | FIND="find ." |
51 | "-(" -name "*.[ch]" -or -name "*.cpp" "-)" \ | 51 | FIND="$FIND '(' -name '*.[ch]' -or -name '*.cpp' ')'" |
52 | -and -not -name "*.api.h" \ | 52 | FIND="$FIND -and -not -name '*.api.h'" |
53 | -and -not -wholename "./super_donators/*" \ | 53 | FIND="$FIND -and -not -wholename './super_donators/*'" |
54 | -and -not -wholename "./third_party/*" \ | 54 | FIND="$FIND -and -not -wholename './third_party/*'" |
55 | -and -not -wholename "./toxencryptsave/crypto_pwhash*"` | 55 | FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'" |
56 | |||
57 | SOURCES=`eval "$FIND"` | ||
56 | 58 | ||
57 | $ASTYLE -n --options=other/astyle/astylerc $SOURCES | 59 | $ASTYLE -n --options=other/astyle/astylerc $SOURCES |
58 | 60 | ||