diff --git a/deploy-staging.sh b/deploy-staging.sh index e68e91c4..871d98a7 100755 --- a/deploy-staging.sh +++ b/deploy-staging.sh @@ -1,14 +1,15 @@ #!/usr/bin/env bash -for cmd in find xargs php git; do - command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; } -done +if [ "$1" != '--without-validation' ]; then + for cmd in find xargs php git; do + command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; } + done - -find . -name "*.php" -print0 | grep -va archive | xargs -0 -n1 php -l -if [ $? -ne 0 ]; then - echo "not deploying b0rken code ;)" - exit 1 + find . -name "*.php" | grep -v archive | xargs -n1 php -l + if [ $? -ne 0 ]; then + echo "not deploying b0rken code ;)" + exit 1 + fi fi echo "" diff --git a/deploy.sh b/deploy.sh index 8b9ae764..864d4f38 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,14 +1,15 @@ #!/usr/bin/env bash -for cmd in find xargs php git; do - command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; } -done +if [ "$1" != '--without-validation' ]; then + for cmd in find xargs php git; do + command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; } + done - -find . -name "*.php" | grep -v archive | xargs -n1 php -l -if [ $? -ne 0 ]; then - echo "not deploying b0rken code ;)" - exit 1 + find . -name "*.php" | grep -v archive | xargs -n1 php -l + if [ $? -ne 0 ]; then + echo "not deploying b0rken code ;)" + exit 1 + fi fi echo ""