aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorMaZderMind2016-12-20 22:37:47 +0100
committerMaZderMind2016-12-20 22:37:47 +0100
commit86331ff4c0fbac69c9a8df32838c282a0ed2ce12 (patch)
treec81452164d40b7561d274ce7c158f15c1f0b3e2d /deploy.sh
parent8f2df0a5b85fb8947999aad27fb98cd1392e1ef0 (diff)
shorten available commands check (and require git)
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/deploy.sh b/deploy.sh
index 4a61dac..2d32a31 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,8 +1,9 @@
#!/bin/bash
-command -v find >/dev/null 2>&1 || { echo >&2 "I require find but it's not installed. Aborting."; exit 1; }
-command -v xargs >/dev/null 2>&1 || { echo >&2 "I require xargs but it's not installed. Aborting."; exit 1; }
-command -v php >/dev/null 2>&1 || { echo >&2 "I require php but it's not installed. Aborting."; exit 1; }
+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 | xargs -0 -n1 php -l
if [ $? -ne 0 ]; then