3 if [[ "x$BASH_SOURCE" == "x" ]]; then echo '$BASH_SOURCE not set'; exit 1; fi
4 DEV
=$
(cd -P "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
6 set -e # DO NOT USE PIPES unless this is rewritten
8 if [ -d $DEV/php
]; then
9 echo "PHP is already installed"
13 TAR
=php5.4
-latest.
tar.gz
14 PHPURL
=http
://snaps.php.net
/$TAR
18 # Some debain-like systems bundle wget but not curl, some other systems
19 # like os x bundle curl but not wget... use whatever is available
20 echo -n "Downloading PHP 5.4"
21 if command -v wget
&>/dev
/null
; then
24 elif command -v curl
&>/dev
/null
; then
29 echo "Could not find curl or wget." >&2;
33 echo "Extracting php 5.4"
38 echo "Configuring and installing php 5.4 in $IP/maintenance/dev/php/"
39 .
/configure
--prefix=$DEV/php
/