mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
Add -f parameter to lint.sh to allow it to not be useless in cygwin
find can conflict with windows' built in find command, which causes it to bug out when running tests.
This commit is contained in:
parent
60e1b29462
commit
d75c830a7e
@ -2,8 +2,9 @@
|
||||
|
||||
PHP_BINARY="php"
|
||||
DIR=""
|
||||
FIND="find"
|
||||
|
||||
while getopts "p:d:" OPTION 2> /dev/null; do
|
||||
while getopts "p:d:f:" OPTION 2> /dev/null; do
|
||||
case ${OPTION} in
|
||||
p)
|
||||
PHP_BINARY="$OPTARG"
|
||||
@ -11,6 +12,9 @@ while getopts "p:d:" OPTION 2> /dev/null; do
|
||||
d)
|
||||
DIR="$OPTARG"
|
||||
;;
|
||||
f)
|
||||
FIND="$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -21,7 +25,7 @@ fi
|
||||
|
||||
echo Running PHP lint scans on \"$DIR\"...
|
||||
|
||||
OUTPUT=`find "$DIR" -name "*.php" -print0 | xargs -0 -n1 -P4 "$PHP_BINARY" -l`
|
||||
OUTPUT=`$FIND "$DIR" -name "*.php" -print0 | xargs -0 -n1 -P4 "$PHP_BINARY" -l`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $OUTPUT | grep -v "No syntax errors"
|
||||
|
Loading…
x
Reference in New Issue
Block a user