Index: trunk/tools/mwmultiversion/scripts/scap |
— | — | @@ -0,0 +1,44 @@ |
| 2 | +#!/bin/bash |
| 3 | + |
| 4 | +BINDIR=/home/wikipedia/bin |
| 5 | +SOURCE=/home/wikipedia/common/php-1.17 |
| 6 | +DEST=/usr/local/apache/common-local/php-1.17 |
| 7 | + |
| 8 | +# Perform syntax check |
| 9 | + |
| 10 | +if [ ! -S "$SSH_AUTH_SOCK" ]; then |
| 11 | + echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket." |
| 12 | + echo >&2 "Did you start your ssh-agent?" |
| 13 | + exit 1 |
| 14 | +fi |
| 15 | + |
| 16 | + |
| 17 | +echo Checking syntax... |
| 18 | +if ! $BINDIR/lint "$SOURCE"; then |
| 19 | + echo Found syntax errors, cannot sync |
| 20 | + exit |
| 21 | +fi |
| 22 | + |
| 23 | +# Update the current machine so that serialization works |
| 24 | +$BINDIR/sync-common |
| 25 | + |
| 26 | +# Regenerate the extension message file list |
| 27 | +echo Updating ExtensionMessages.php... |
| 28 | +php $SOURCE/maintenance/mergeMessageFileList.php --list-file=$SOURCE/../wmf-config/extension-list \ |
| 29 | + --output=$SOURCE/../wmf-config/ExtensionMessages.php |
| 30 | + |
| 31 | +# Notify |
| 32 | +$BINDIR/dologmsg "!log $USER synchronizing Wikimedia installation... $(cd /home/wikipedia/common/php-1.17; svn info|grep ^Revision): $*" |
| 33 | + |
| 34 | + |
| 35 | +# Copy |
| 36 | +$BINDIR/set-group-write |
| 37 | + |
| 38 | +echo Copying style sheets to apaches... |
| 39 | +ddsh -F30 -cM -g mediawiki-installation 'if [ -x /home/wikipedia/bin/scap-1skins ]; then echo "/home-mounted apache $(hostname)"; /home/wikipedia/bin/scap-1skins; else /usr/bin/scap-1skins; fi' |
| 40 | + |
| 41 | +echo Copying code to apaches... |
| 42 | +ddsh -F30 -cM -g mediawiki-installation 'if [ -x /home/wikipedia/bin/scap-1 ]; then echo "/home-mounted apache $(hostname)"; /home/wikipedia/bin/scap-1; else /usr/bin/scap-1; fi' |
| 43 | +echo Finished |
| 44 | + |
| 45 | +$BINDIR/dologmsg "sync done." |