Index: trunk/tools/mwmultiversion/scripts/mwversionsinuse |
— | — | @@ -1,8 +1,8 @@ |
2 | 2 | #!/bin/sh |
3 | 3 | # Returns a space separated list of all active MW versions (e.g. "x.xx"). |
4 | | -# The versions are defined in /usr/local/apache/common-local/wmf-config/wikiversions.cdb. |
5 | | -# If --dbonly is passed in, then each item in the list will be a DB name |
6 | | -# for *some* wiki that uses that version instead of the version number. |
| 4 | +# Versions are defined in /usr/local/apache/common-local/wmf-config/wikiversions.cdb. |
| 5 | +# If --withdb is passed in, then each item in the list will be appended |
| 6 | +# with '=' followed by the DB name of *some* wiki that uses that version. |
7 | 7 | # This script belongs in /usr/bin/. |
8 | 8 | declare -a mwVersionsRes |
9 | 9 | declare -a mwVersionsNums |
— | — | @@ -23,8 +23,8 @@ |
24 | 24 | |
25 | 25 | if [ $mwVersionInArray -eq 0 ]; then |
26 | 26 | mwVersionsNums=("${mwVersionsNums[@]}" "$mwVersionNum") |
27 | | - if [ "$1" -eq "--dbonly" ]; then |
28 | | - mwVersionsRes=("${mwVersionsRes[@]}" "$mwDbName") |
| 27 | + if [ "$1" -eq "--withdb" ]; then |
| 28 | + mwVersionsRes=("${mwVersionsRes[@]}" "$mwVersionNum=$mwDbName") |
29 | 29 | else |
30 | 30 | mwVersionsRes=("${mwVersionsRes[@]}" "$mwVersionNum") |
31 | 31 | fi |
Index: trunk/tools/mwmultiversion/scripts/l10nupdate |
— | — | @@ -15,25 +15,27 @@ |
16 | 16 | exit 1 |
17 | 17 | fi |
18 | 18 | |
19 | | -mwDbNames=(`mwversionsinuse --dbonly`) |
20 | | -if [ -z "$mwDbNames" ]; then |
| 19 | +mwVerDbSets=(`mwversionsinuse --withdb`) |
| 20 | +if [ -z "$mwVerDbSets" ]; then |
21 | 21 | /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed" |
22 | 22 | echo "FAILED" |
23 | 23 | exit 1 |
24 | 24 | fi |
25 | 25 | |
26 | | -for mwDb in "${mwDbNames[@]}" |
| 26 | +for i in "${mwVerDbSets[@]}" |
27 | 27 | do |
| 28 | + mwVerNum=${i%=*} |
| 29 | + mwDbName=${i#*=} |
28 | 30 | if mwscript extensions/LocalisationUpdate/update.php \ |
29 | | - --wiki="$mwDb" \ |
30 | | - --outdir=/home/wikipedia/common/php/cache/l10n \ |
| 31 | + --wiki="$mwDbName" \ |
| 32 | + --outdir=/home/wikipedia/common/php-"$mwVerNum"/cache/l10n \ |
31 | 33 | --all \ |
32 | 34 | --quiet |
33 | 35 | then |
34 | 36 | echo "Completed. Syncing to Apaches" |
35 | 37 | /home/wikipedia/bin/sync-l10nupdate |
36 | 38 | echo "Clearing message blobs" |
37 | | - mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDb" |
| 39 | + mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName" |
38 | 40 | echo "All done" |
39 | 41 | else |
40 | 42 | /home/wikipedia/bin/dologmsg "!log LocalisationUpdate failed" |