https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112405
Revision: 112405 Author: krinkle Date: 2012-02-25 17:42:55 +0000 (Sat, 25 Feb 2012) Log Message: ----------- [TsIntuition] Commit tsIntUpdate bash script - Not very pretty right now, but we've been using it for the toolserver for a while, better keep it in subversion in case we need it elsewhere Added Paths: ----------- trunk/tools/ToolserverI18N/scripts/tsIntUpdate Added: trunk/tools/ToolserverI18N/scripts/tsIntUpdate =================================================================== --- trunk/tools/ToolserverI18N/scripts/tsIntUpdate (rev 0) +++ trunk/tools/ToolserverI18N/scripts/tsIntUpdate 2012-02-25 17:42:55 UTC (rev 112405) @@ -0,0 +1,46 @@ +#!/bin/bash +## Update svn checkout of ToolserverI18N to HEAD +## Quick ugly script to check working copy, update and log + +TSINT_DIR="$HOME/ToolserverI18N" +TSINT_UPLOG="$HOME/tsint-update.log" +TSINT_UPSTATE="failed" + +echo " +== ToolserverI18N svn update script == +" + +TSINT_REV=`svnversion $TSINT_DIR` + +echo "-- Current check out: $TSINT_DIR" +echo "-- Current $TSINT_REV" + +echo "-- Checking working copy for local changes..." +TSINT_DIFF=`svn diff $TSINT_DIR` +TSINT_DIFFLEN=${#TSINT_DIFF} + +if [[ "$TSINT_DIFFLEN" -lt 2 ]]; then + echo "-- All OK. No local changes!" + echo "-- Continueing update..." + svn up $TSINT_DIR + echo "-- Update completed" + TSINT_UPSTATE="successful" + echo "" + echo "-- Logging:" + +else + echo "-- UPDATE ABORTED: Local changes found!" + echo " Please commit them from your account and/or revert" + echo " working copy with 'svn revert $TSINT_DIR --recursive'" + echo "" + echo "svn diff:" + echo "$TSINT_DIFF" + echo "" + echo "-- Logging:" +fi; + +TSINT_DATE=`date +%Y-%m-%d\ %H:%M:%S` +TSINT_LOGMSG="$TSINT_DATE (UTC): $SUDO_USER ran a $TSINT_UPSTATE update from $TSINT_REV to `svnversion $TSINT_DIR`" +echo "$TSINT_LOGMSG" >> $TSINT_UPLOG +echo "$TSINT_LOGMSG +" \ No newline at end of file Property changes on: trunk/tools/ToolserverI18N/scripts/tsIntUpdate ___________________________________________________________________ Added: svn:executable + * _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs