OSDN Git Service

dev-build: check that 'php' is available before doing anything else
authorscribu <mail@scribu.net>
Fri, 26 Apr 2013 19:29:00 +0000 (22:29 +0300)
committerscribu <mail@scribu.net>
Fri, 26 Apr 2013 20:15:38 +0000 (23:15 +0300)
see #419

utils/dev-build
utils/find-php

index 6583a47..2f0a97d 100755 (executable)
@@ -1,5 +1,11 @@
 #!/usr/bin/env bash
 
+# check that PHP is available
+command -v php > /dev/null || {
+       echo "can't find PHP binary" >&2
+       exit 1
+}
+
 # install Composer
 command -v composer > /dev/null || {
        curl -sS https://getcomposer.org/installer | php
index e1a82c4..f8d19f4 100755 (executable)
@@ -15,5 +15,5 @@ if [ $? -eq 0 ]; then
        exit
 fi
 
-echo "no php binary found"
+echo "no PHP binary found" >&2
 exit 1