Index: trunk/tools/mwmultiversion/scripts/l10nupdate |
— | — | @@ -1,46 +1,48 @@ |
2 | 2 | #!/bin/sh |
3 | 3 | # This script belongs in /home/wikipedia/bin/. |
4 | 4 | PATH=/bin:/usr/bin:/sbin:/usr/sbin: |
| 5 | +BINDIR=/home/wikipedia/bin |
5 | 6 | |
6 | 7 | umask 0002 |
7 | 8 | |
| 9 | +# SVN up i18 messages to /trunk HEAD |
8 | 10 | echo "Starting l10nupdate at `date`." |
9 | 11 | if svn up --ignore-externals /home/wikipedia/l10n/trunk/phase3 && |
10 | 12 | svn up --ignore-externals /home/wikipedia/l10n/trunk/extensions |
11 | 13 | then |
12 | 14 | echo "SVN update completed." |
13 | 15 | else |
14 | | - /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed" |
| 16 | + $BINDIR/dologmsg "!log LocalisationUpdate failed" |
15 | 17 | echo "FAILED" |
16 | 18 | exit 1 |
17 | 19 | fi |
18 | 20 | |
19 | | -mwVerDbSets=(`mwversionsinuse --extended --withdb`) |
| 21 | +# Get all MW message cache versions (and a wiki DB name for each) |
| 22 | +mwVerDbSets=(`$BINDIR/mwversionsinuse --extended --withdb`) |
20 | 23 | if [ -z "$mwVerDbSets" ]; then |
21 | | - /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed" |
| 24 | + $BINDIR/dologmsg "!log LocalisationUpdate failed" |
22 | 25 | echo "FAILED" |
23 | 26 | exit 1 |
24 | 27 | fi |
25 | 28 | |
| 29 | +# Update l10n cache and clear the message cache for these versions |
26 | 30 | for i in "${mwVerDbSets[@]}" |
27 | 31 | do |
28 | 32 | mwVerNum=${i%=*} |
29 | 33 | mwDbName=${i#*=} |
30 | | - if mwscript extensions/LocalisationUpdate/update.php \ |
| 34 | + if $BINDIR/mwscript extensions/LocalisationUpdate/update.php \ |
31 | 35 | --wiki="$mwDbName" \ |
32 | 36 | --outdir=/home/wikipedia/common/php-"$mwVerNum"/cache/l10n \ |
33 | 37 | --all \ |
34 | 38 | --quiet |
35 | 39 | then |
36 | 40 | echo "Completed. Syncing to Apaches" |
37 | | - /home/wikipedia/bin/sync-l10nupdate "$mwVerNum" |
| 41 | + $BINDIR/sync-l10nupdate "$mwVerNum" |
38 | 42 | echo "Clearing message blobs" |
39 | | - mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName" |
| 43 | + $BINDIR/mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName" |
40 | 44 | echo "All done" |
41 | 45 | else |
42 | | - /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed" |
| 46 | + $BINDIR/dologmsg "!log LocalisationUpdate failed" |
43 | 47 | echo "FAILED" |
44 | 48 | fi |
45 | 49 | done |
46 | | -## Apache clients should sync updates locally every X hours or at scap time |
47 | | -# Not needed anymore as of 3/20/2011 --Roan |