Merge "SpecialNewPages: Fix omitted Show/Hide redirect value"
[lhc/web/wiklou.git] / maintenance / dev / installmw.sh
index 6146b33..9ae3c59 100755 (executable)
@@ -1,16 +1,18 @@
 #!/bin/bash
 
-if [[ "x$BASH_SOURCE" == "x" ]]; then echo '$BASH_SOURCE not set'; exit 1; fi
+if [ "x$BASH_SOURCE" == "x" ]; then echo '$BASH_SOURCE not set'; exit 1; fi
 DEV=$(cd -P "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
 
+. "$DEV/includes/require-php.sh"
+
 set -e
 
 PORT=4881
 
-cd $DEV/../../; # $IP
+cd "$DEV/../../"; # $IP
 
-mkdir $DEV/data
-$DEV/php/bin/php maintenance/install.php --server="http://localhost:$PORT" --scriptpath="" --dbtype=sqlite --dbpath=$DEV/data --pass=admin "Trunk Test" $USER
+mkdir -p "$DEV/data"
+"$PHP" maintenance/install.php --server="http://localhost:$PORT" --scriptpath="" --dbtype=sqlite --dbpath="$DEV/data" --pass=admin "Trunk Test" "$USER"
 echo ""
 echo "Development wiki created with admin user $USER and password 'admin'."
 echo ""