From c6a11daac96f60948ae5726ccc5aeac4673c497d Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sun, 11 Dec 2011 19:49:16 +0000 Subject: [PATCH] Follow up r105821, as usual, commit the files I forgot to `svn add` --- maintenance/dev/includes/php.sh | 12 ++++++++++++ maintenance/dev/includes/require-php.sh | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 maintenance/dev/includes/php.sh create mode 100644 maintenance/dev/includes/require-php.sh diff --git a/maintenance/dev/includes/php.sh b/maintenance/dev/includes/php.sh new file mode 100644 index 0000000000..3021b93b17 --- /dev/null +++ b/maintenance/dev/includes/php.sh @@ -0,0 +1,12 @@ +# Include-able script to determine the location of our php if any + +if [ -d "$DEV/php" -a -x "$DEV/php/bin/php" ]; then + # Quick local copy + PHP="$DEV/php/bin/php" +elif [ -d "$HOME/.mediawiki/php" -a -x "$HOME/.mediawiki/php/bin/php" ]; then + # Previous home directory location to install php in + PHP="$HOME/.mediawiki/php/bin/php" +elif [ -d "$HOME/.mwphp" -a -x "$HOME/.mwphp/bin/php" ]; then + # Previous home directory location to install php in + PHP="$HOME/.mwphp/bin/php" +fi diff --git a/maintenance/dev/includes/require-php.sh b/maintenance/dev/includes/require-php.sh new file mode 100644 index 0000000000..470e6eb858 --- /dev/null +++ b/maintenance/dev/includes/require-php.sh @@ -0,0 +1,8 @@ +# Include-able script to require that we have a known php binary we can execute + +. "$DEV/includes/php.sh" + +if [ "x$PHP" == "x" -o ! -x "$PHP" ]; then + echo "Local copy of PHP is not installed" + exit 1 +fi -- 2.20.1