https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102208

Revision: 102208
Author:   dantman
Date:     2011-11-06 23:13:36 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
Followup r102201, quote all variables to guard against paths with spaces in 
them.

Modified Paths:
--------------
    trunk/phase3/maintenance/dev/install.sh
    trunk/phase3/maintenance/dev/installmw.sh
    trunk/phase3/maintenance/dev/installphp.sh
    trunk/phase3/maintenance/dev/start.sh

Modified: trunk/phase3/maintenance/dev/install.sh
===================================================================
--- trunk/phase3/maintenance/dev/install.sh     2011-11-06 23:11:46 UTC (rev 
102207)
+++ trunk/phase3/maintenance/dev/install.sh     2011-11-06 23:13:36 UTC (rev 
102208)
@@ -3,6 +3,6 @@
 if [[ "x$BASH_SOURCE" == "x" ]]; then echo '$BASH_SOURCE not set'; exit 1; fi
 DEV=$(cd -P "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
 
-$DEV/installphp.sh
-$DEV/installmw.sh
-$DEV/start.sh
+"$DEV/installphp.sh"
+"$DEV/installmw.sh"
+"$DEV/start.sh"

Modified: trunk/phase3/maintenance/dev/installmw.sh
===================================================================
--- trunk/phase3/maintenance/dev/installmw.sh   2011-11-06 23:11:46 UTC (rev 
102207)
+++ trunk/phase3/maintenance/dev/installmw.sh   2011-11-06 23:13:36 UTC (rev 
102208)
@@ -7,10 +7,10 @@
 
 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 "$DEV/data"
+"$DEV/php/bin/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 ""

Modified: trunk/phase3/maintenance/dev/installphp.sh
===================================================================
--- trunk/phase3/maintenance/dev/installphp.sh  2011-11-06 23:11:46 UTC (rev 
102207)
+++ trunk/phase3/maintenance/dev/installphp.sh  2011-11-06 23:13:36 UTC (rev 
102208)
@@ -5,25 +5,25 @@
 
 set -e # DO NOT USE PIPES unless this is rewritten
 
-if [ -d $DEV/php ]; then
+if [ -d "$DEV/php" ]; then
        echo "PHP is already installed"
        exit 1
 fi
 
 TAR=php5.4-latest.tar.gz
-PHPURL=http://snaps.php.net/$TAR
+PHPURL="http://snaps.php.net/$TAR";
 
-cd $DEV
+cd "$DEV"
 
 # Some debain-like systems bundle wget but not curl, some other systems
 # like os x bundle curl but not wget... use whatever is available
 echo -n "Downloading PHP 5.4"
 if command -v wget &>/dev/null; then
        echo "- using wget"
-       wget $PHPURL
+       wget "$PHPURL"
 elif command -v curl &>/dev/null; then
        echo "- using curl"
-       curl -O $PHPURL
+       curl -O "$PHPURL"
 else
        echo "- aborting"
        echo "Could not find curl or wget." >&2;
@@ -31,11 +31,11 @@
 fi
 
 echo "Extracting php 5.4"
-tar -xzf $TAR
+tar -xzf "$TAR"
 
 cd php5.4-*/
 
-echo "Configuring and installing php 5.4 in $IP/maintenance/dev/php/"
-./configure --prefix=$DEV/php/
+echo "Configuring and installing php 5.4 in \$IP/maintenance/dev/php/"
+./configure --prefix="$DEV/php/"
 make
 make install

Modified: trunk/phase3/maintenance/dev/start.sh
===================================================================
--- trunk/phase3/maintenance/dev/start.sh       2011-11-06 23:11:46 UTC (rev 
102207)
+++ trunk/phase3/maintenance/dev/start.sh       2011-11-06 23:13:36 UTC (rev 
102208)
@@ -8,5 +8,5 @@
 echo "Starting up MediaWiki at http://localhost:$PORT/";
 echo ""
 
-cd $DEV/../../; # $IP
-$DEV/php/bin/php -S localhost:$PORT
+cd "$DEV/../../"; # $IP
+"$DEV/php/bin/php" -S "localhost:$PORT"


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to