From 414b8f7425aeb22b02a1649830cf96e7ac1163b0 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 21 Feb 2018 14:15:57 +0000 Subject: [PATCH] Fix OSX tests: find(1) doesn't work like on Linux. --- other/astyle/format-source | 16 +++++++++------- 1 file 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 @@ #!/bin/sh -set -e +set -ex SOURCE_DIR="$1" ASTYLE="$2" @@ -47,12 +47,14 @@ if grep '' */*.h; then exit 1 fi -SOURCES=`find . \ - "-(" -name "*.[ch]" -or -name "*.cpp" "-)" \ - -and -not -name "*.api.h" \ - -and -not -wholename "./super_donators/*" \ - -and -not -wholename "./third_party/*" \ - -and -not -wholename "./toxencryptsave/crypto_pwhash*"` +FIND="find ." +FIND="$FIND '(' -name '*.[ch]' -or -name '*.cpp' ')'" +FIND="$FIND -and -not -name '*.api.h'" +FIND="$FIND -and -not -wholename './super_donators/*'" +FIND="$FIND -and -not -wholename './third_party/*'" +FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'" + +SOURCES=`eval "$FIND"` $ASTYLE -n --options=other/astyle/astylerc $SOURCES