Index: trunk/phase3/maintenance/dev/includes/require-php.sh |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +# Include-able script to require that we have a known php binary we can execute |
| 3 | + |
| 4 | +. "$DEV/includes/php.sh" |
| 5 | + |
| 6 | +if [ "x$PHP" == "x" -o ! -x "$PHP" ]; then |
| 7 | + echo "Local copy of PHP is not installed" |
| 8 | + exit 1 |
| 9 | +fi |
Index: trunk/phase3/maintenance/dev/includes/php.sh |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +# Include-able script to determine the location of our php if any |
| 3 | + |
| 4 | +if [ -d "$DEV/php" -a -x "$DEV/php/bin/php" ]; then |
| 5 | + # Quick local copy |
| 6 | + PHP="$DEV/php/bin/php" |
| 7 | +elif [ -d "$HOME/.mediawiki/php" -a -x "$HOME/.mediawiki/php/bin/php" ]; then |
| 8 | + # Previous home directory location to install php in |
| 9 | + PHP="$HOME/.mediawiki/php/bin/php" |
| 10 | +elif [ -d "$HOME/.mwphp" -a -x "$HOME/.mwphp/bin/php" ]; then |
| 11 | + # Previous home directory location to install php in |
| 12 | + PHP="$HOME/.mwphp/bin/php" |
| 13 | +fi |