Skip to content

Commit b8e07d4

Browse files
committed
fixed script to run nicely under alpine linux
1 parent f3a43a3 commit b8e07d4

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

php-check

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/sh
22

3-
[[ "$1" = "recent" ]] && ADDITONAL_OPTIONS="-mmin -240"
3+
if [ "$1" = "recent" ]; then
4+
ADDITONAL_OPTIONS="-mmin -240"
5+
else
6+
ADDITONAL_OPTIONS=""
7+
find
48

59
find . $ADDITONAL_OPTIONS -name "*.php" -print0 | xargs -0 -n1 -P10 php -l | grep -v 'No syntax errors'
610

ruby-check

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/sh
22

3-
[[ "$1" = "recent" ]] && ADDITONAL_OPTIONS="-mmin -240"
3+
if [ "$1" = "recent" ]; then
4+
ADDITONAL_OPTIONS="-mmin -240"
5+
else
6+
ADDITONAL_OPTIONS=""
7+
fi
48

59
find . $ADDITONAL_OPTIONS -name "*.rb" -print0 | xargs -0 -n1 -P10 ruby -c | grep -v 'Syntax OK'
610

0 commit comments

Comments
 (0)