Index: trunk/tools/mwmultiversion/scripts/scap |
— | — | @@ -3,47 +3,60 @@ |
4 | 4 | BINDIR=/home/wikipedia/bin |
5 | 5 | SOURCE=/home/wikipedia/common |
6 | 6 | |
7 | | -# Perform syntax check |
8 | | - |
9 | 7 | if [ ! -S "$SSH_AUTH_SOCK" ]; then |
10 | 8 | echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket." |
11 | 9 | echo >&2 "Did you start your ssh-agent?" |
12 | 10 | exit 1 |
13 | 11 | fi |
14 | 12 | |
15 | | -mwVerDbSets=(`mwversionsinuse --withdb`) |
| 13 | +mwVerDbSets=(`mwversionsinuse --home --withdb`) |
16 | 14 | if [ -z "$mwVerDbSets" ]; then |
17 | | - echo "Unable to read wikiversions.dat or it is empty" |
| 15 | + echo "Unable to read wikiversions.dat or it is empty." |
18 | 16 | exit 1 |
19 | 17 | fi |
20 | 18 | |
| 19 | +# Perform syntax check |
21 | 20 | echo Checking syntax... |
| 21 | +if [ ! [ $BINDIR/lint $SOURCE/wmf-config && $BINDIR/lint $SOURCE/multiversion ] ]; then |
| 22 | + echo "Found syntax errors, cannot sync." |
| 23 | + exit 1 |
| 24 | +fi |
| 25 | +# Check syntax for all active MediaWiki versions |
22 | 26 | for i in "${mwVerDbSets[@]}" |
23 | 27 | do |
24 | 28 | mwVerNum=${i%=*} |
25 | | - if ! $BINDIR/lint "$SOURCE"/php-"$mwVerNum"; then |
26 | | - echo Found syntax errors, cannot sync |
27 | | - exit |
| 29 | + if [ ! $BINDIR/lint $SOURCE/php-"$mwVerNum" ]; then |
| 30 | + echo "Found syntax errors, cannot sync." |
| 31 | + exit 1 |
28 | 32 | fi |
29 | 33 | done |
30 | 34 | |
31 | | -# Update the current machine so that serialization works |
| 35 | +# Update wikiversions.cdb from wikiversions.dat |
| 36 | +if [ ! $SOURCE/multiversion/refreshWikiversionsCDB ]; then |
| 37 | + echo "Unable to run refreshWikiversionsCDB." |
| 38 | + exit 1 |
| 39 | +fi |
| 40 | + |
| 41 | + |
| 42 | +# Update the current machine so that serialization works. |
| 43 | +# wikiversions.cdb update is pushed and mwscript works. |
32 | 44 | $BINDIR/sync-common |
33 | 45 | |
34 | 46 | |
| 47 | +# Regenerate the extension message file list for all active MediaWiki versions |
35 | 48 | for i in "${mwVerDbSets[@]}" |
36 | 49 | do |
37 | 50 | mwVerNum=${i%=*} |
38 | 51 | mwDbName=${i#*=} |
39 | | - # Regenerate the extension message file list |
40 | | - echo Updating ExtensionMessages.php... |
| 52 | + echo "Updating ExtensionMessages-$mwVerNum.php..." |
41 | 53 | mwscript mergeMessageFileList.php --wiki="$mwDbName" \ |
42 | 54 | --list-file=$SOURCE/wmf-config/extension-list \ |
43 | 55 | --output=$SOURCE/wmf-config/ExtensionMessages-"$mwVerNum".php |
44 | 56 | done |
45 | 57 | |
| 58 | + |
46 | 59 | # Notify |
47 | | -$BINDIR/dologmsg "!log $USER synchronizing Wikimedia installation... $(cd /home/wikipedia/common/php-1.17; svn info|grep ^Revision): $*" |
| 60 | +$BINDIR/dologmsg "!log $USER synchronizing Wikimedia installation... : $*" |
48 | 61 | |
49 | 62 | |
50 | 63 | # Copy |
Index: trunk/tools/mwmultiversion/scripts/sync-l10nupdate |
— | — | @@ -1,14 +1,13 @@ |
2 | 2 | #!/bin/bash |
3 | 3 | # This script belongs in /home/wikipedia/bin/. |
4 | 4 | PATH=/bin:/usr/bin:/sbin:/usr/sbin: |
| 5 | +MWVER="$1" |
5 | 6 | |
6 | 7 | mwVersionNums=(`mwversionsinuse`) |
7 | 8 | |
8 | | -for mwVerNum in "${mwVersionNums[@]}" |
9 | | -do |
10 | | - echo "Synchronizing /home/wikipedia/common/php-$mwVerNum/cache/l10n to /usr/local/apache/common-local/php-$mwVerNum/cache/l10n..." |
11 | | - echo "mediawiki-installation:" |
| 9 | +echo "Synchronizing /home/wikipedia/common/php-$MWVER/cache/l10n to /usr/local/apache/common-local/php-$MWVER/cache/l10n..." |
| 10 | +echo "mediawiki-installation:" |
12 | 11 | |
13 | | - ddsh -cM -g mediawiki-installation \ |
14 | | - "sudo -u mwdeploy rsync -a 10.0.5.8::common/php-$mwVerNum/cache/l10n/ /usr/local/apache/common-local/php-$mwVerNum/cache/l10n" |
15 | | -done |
| 12 | +ddsh -cM -g mediawiki-installation \ |
| 13 | + "sudo -u mwdeploy rsync -a 10.0.5.8::common/php-$MWVER/cache/l10n/ /usr/local/apache/common-local/php-$MWVER/cache/l10n" |
| 14 | + |
Index: trunk/tools/mwmultiversion/scripts/scap-1skins |
— | — | @@ -1,8 +1,12 @@ |
2 | 2 | #!/bin/bash |
3 | 3 | |
4 | | -sudo -u mwdeploy sh -c ' |
5 | | -rsync -a --no-perms 10.0.5.8::common/php-1.17/skins/ \ |
6 | | -/usr/local/apache/common-local/php-1.17/skins && \ |
7 | | -echo ok || \ |
8 | | -echo failed |
9 | | -' |
| 4 | +mwVersionNums=(`mwversionsinuse`) |
| 5 | +for mwVerNum in "${mwVersionNums[@]}" |
| 6 | +do |
| 7 | + sudo -u mwdeploy sh -c " |
| 8 | + rsync -a --no-perms 10.0.5.8::common/php-$mwVerNum/skins/ \ |
| 9 | + /usr/local/apache/common-local/php-$mwVerNum/skins && \ |
| 10 | + echo ok || \ |
| 11 | + echo failed |
| 12 | + " |
| 13 | +done |
Index: trunk/tools/mwmultiversion/scripts/l10nupdate |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | --quiet |
35 | 35 | then |
36 | 36 | echo "Completed. Syncing to Apaches" |
37 | | - /home/wikipedia/bin/sync-l10nupdate |
| 37 | + /home/wikipedia/bin/sync-l10nupdate "$mwVerNum" |
38 | 38 | echo "Clearing message blobs" |
39 | 39 | mwscript maintenance/wmf/clearMessageBlobs.php --wiki="$mwDbName" |
40 | 40 | echo "All done" |