Fix OSX tests: find(1) doesn't work like on Linux.

This commit is contained in:
iphydf 2018-02-21 14:15:57 +00:00
parent ee53d96447
commit 414b8f7425
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
set -e set -ex
SOURCE_DIR="$1" SOURCE_DIR="$1"
ASTYLE="$2" ASTYLE="$2"
@ -47,12 +47,14 @@ if grep '<unresolved>' */*.h; then
exit 1 exit 1
fi fi
SOURCES=`find . \ FIND="find ."
"-(" -name "*.[ch]" -or -name "*.cpp" "-)" \ FIND="$FIND '(' -name '*.[ch]' -or -name '*.cpp' ')'"
-and -not -name "*.api.h" \ FIND="$FIND -and -not -name '*.api.h'"
-and -not -wholename "./super_donators/*" \ FIND="$FIND -and -not -wholename './super_donators/*'"
-and -not -wholename "./third_party/*" \ FIND="$FIND -and -not -wholename './third_party/*'"
-and -not -wholename "./toxencryptsave/crypto_pwhash*"` FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'"
SOURCES=`eval "$FIND"`
$ASTYLE -n --options=other/astyle/astylerc $SOURCES $ASTYLE -n --options=other/astyle/astylerc $SOURCES