r102208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102207‎ | r102208 | r102209 >
Date:23:13, 6 November 2011
Author:dantman
Status:ok
Tags:
Comment:
Followup r102201, quote all variables to guard against paths with spaces in them.
Modified paths:
  • /trunk/phase3/maintenance/dev/install.sh (modified) (history)
  • /trunk/phase3/maintenance/dev/installmw.sh (modified) (history)
  • /trunk/phase3/maintenance/dev/installphp.sh (modified) (history)
  • /trunk/phase3/maintenance/dev/start.sh (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dev/install.sh
@@ -3,6 +3,6 @@
44 if [[ "x$BASH_SOURCE" == "x" ]]; then echo '$BASH_SOURCE not set'; exit 1; fi
55 DEV=$(cd -P "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
66
7 -$DEV/installphp.sh
8 -$DEV/installmw.sh
9 -$DEV/start.sh
 7+"$DEV/installphp.sh"
 8+"$DEV/installmw.sh"
 9+"$DEV/start.sh"
Index: trunk/phase3/maintenance/dev/installmw.sh
@@ -7,10 +7,10 @@
88
99 PORT=4881
1010
11 -cd $DEV/../../; # $IP
 11+cd "$DEV/../../"; # $IP
1212
13 -mkdir $DEV/data
14 -$DEV/php/bin/php maintenance/install.php --server="http://localhost:$PORT" --scriptpath="" --dbtype=sqlite --dbpath=$DEV/data --pass=admin "Trunk Test" $USER
 13+mkdir "$DEV/data"
 14+"$DEV/php/bin/php" maintenance/install.php --server="http://localhost:$PORT" --scriptpath="" --dbtype=sqlite --dbpath="$DEV/data" --pass=admin "Trunk Test" "$USER"
1515 echo ""
1616 echo "Development wiki created with admin user $USER and password 'admin'."
1717 echo ""
Index: trunk/phase3/maintenance/dev/start.sh
@@ -8,5 +8,5 @@
99 echo "Starting up MediaWiki at http://localhost:$PORT/"
1010 echo ""
1111
12 -cd $DEV/../../; # $IP
13 -$DEV/php/bin/php -S localhost:$PORT
 12+cd "$DEV/../../"; # $IP
 13+"$DEV/php/bin/php" -S "localhost:$PORT"
Index: trunk/phase3/maintenance/dev/installphp.sh
@@ -5,25 +5,25 @@
66
77 set -e # DO NOT USE PIPES unless this is rewritten
88
9 -if [ -d $DEV/php ]; then
 9+if [ -d "$DEV/php" ]; then
1010 echo "PHP is already installed"
1111 exit 1
1212 fi
1313
1414 TAR=php5.4-latest.tar.gz
15 -PHPURL=http://snaps.php.net/$TAR
 15+PHPURL="http://snaps.php.net/$TAR"
1616
17 -cd $DEV
 17+cd "$DEV"
1818
1919 # Some debain-like systems bundle wget but not curl, some other systems
2020 # like os x bundle curl but not wget... use whatever is available
2121 echo -n "Downloading PHP 5.4"
2222 if command -v wget &>/dev/null; then
2323 echo "- using wget"
24 - wget $PHPURL
 24+ wget "$PHPURL"
2525 elif command -v curl &>/dev/null; then
2626 echo "- using curl"
27 - curl -O $PHPURL
 27+ curl -O "$PHPURL"
2828 else
2929 echo "- aborting"
3030 echo "Could not find curl or wget." >&2;
@@ -31,11 +31,11 @@
3232 fi
3333
3434 echo "Extracting php 5.4"
35 -tar -xzf $TAR
 35+tar -xzf "$TAR"
3636
3737 cd php5.4-*/
3838
39 -echo "Configuring and installing php 5.4 in $IP/maintenance/dev/php/"
40 -./configure --prefix=$DEV/php/
 39+echo "Configuring and installing php 5.4 in \$IP/maintenance/dev/php/"
 40+./configure --prefix="$DEV/php/"
4141 make
4242 make install

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102201Commit maintenance/dev/ a set of bash scripts that can quickly download php 5...dantman22:50, 6 November 2011

Status & tagging log