r94226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94225‎ | r94226 | r94227 >
Date:03:03, 11 August 2011
Author:aaron
Status:ok
Tags:
Comment:
* Removed bogus parenthesis and fixed script type header
* Run the l10n MW scripts on home/ as needed
* Removed useless $PATH var setting
* Improved reporting messages
Modified paths:
  • /trunk/tools/mwmultiversion/scripts/l10nupdate (modified) (history)
  • /trunk/tools/mwmultiversion/scripts/sync-l10nupdate (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/scripts/sync-l10nupdate
@@ -1,6 +1,5 @@
22 #!/bin/bash
33 # This script belongs in /home/wikipedia/bin/.
4 -PATH=/bin:/usr/bin:/sbin:/usr/sbin:
54 MWVER="$1"
65
76 if [ -z "$MWVER" ]; then
Index: trunk/tools/mwmultiversion/scripts/l10nupdate
@@ -1,7 +1,7 @@
2 -#!/bin/sh
 2+#!/bin/bash
33 # This script belongs in /home/wikipedia/bin/.
4 -PATH=/bin:/usr/bin:/sbin:/usr/sbin:
54 BINDIR=/home/wikipedia/bin
 5+MWMULTIDIR=/home/wikipedia/common/multiversion
66
77 umask 0002
88
@@ -18,7 +18,7 @@
1919 fi
2020
2121 # Get all MW message cache versions (and a wiki DB name for each)
22 -mwVerDbSets=(`$BINDIR/mwversionsinuse --extended --withdb`)
 22+mwVerDbSets=`$BINDIR/mwversionsinuse --extended --withdb`
2323 if [ -z "$mwVerDbSets" ]; then
2424 $BINDIR/dologmsg "!log LocalisationUpdate failed"
2525 echo "FAILED"
@@ -30,7 +30,8 @@
3131 do
3232 mwVerNum=${i%=*}
3333 mwDbName=${i#*=}
34 - if $BINDIR/mwscript extensions/LocalisationUpdate/update.php \
 34+ echo "Running updates for $mwVerNum (on $mwDbName)"
 35+ if php $MWMULTIDIR/MWScript.php extensions/LocalisationUpdate/update.php \
3536 --wiki="$mwDbName" \
3637 --outdir=/home/wikipedia/common/php-"$mwVerNum"/cache/l10n \
3738 --all \
@@ -39,10 +40,11 @@
4041 echo "Completed. Syncing to Apaches"
4142 $BINDIR/sync-l10nupdate "$mwVerNum"
4243 echo "Clearing message blobs"
43 - $BINDIR/mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName"
 44+ php $MWMULTIDIR/MWScript.php maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName"
 45+ $BINDIR/dologmsg "!log LocalisationUpdate completed ($mwVerNum) at `date`";
4446 echo "All done"
4547 else
46 - $BINDIR/dologmsg "!log LocalisationUpdate failed"
 48+ $BINDIR/dologmsg "!log LocalisationUpdate failed ($mwVerNum)"
4749 echo "FAILED"
4850 fi
4951 done

Status & tagging log