Index: trunk/tools/ToolserverI18N/scripts/tsIntUpdate |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +#!/bin/bash |
| 3 | +## Update svn checkout of ToolserverI18N to HEAD |
| 4 | +## Quick ugly script to check working copy, update and log |
| 5 | + |
| 6 | +TSINT_DIR="$HOME/ToolserverI18N" |
| 7 | +TSINT_UPLOG="$HOME/tsint-update.log" |
| 8 | +TSINT_UPSTATE="failed" |
| 9 | + |
| 10 | +echo " |
| 11 | +== ToolserverI18N svn update script == |
| 12 | +" |
| 13 | + |
| 14 | +TSINT_REV=`svnversion $TSINT_DIR` |
| 15 | + |
| 16 | +echo "-- Current check out: $TSINT_DIR" |
| 17 | +echo "-- Current $TSINT_REV" |
| 18 | + |
| 19 | +echo "-- Checking working copy for local changes..." |
| 20 | +TSINT_DIFF=`svn diff $TSINT_DIR` |
| 21 | +TSINT_DIFFLEN=${#TSINT_DIFF} |
| 22 | + |
| 23 | +if [[ "$TSINT_DIFFLEN" -lt 2 ]]; then |
| 24 | + echo "-- All OK. No local changes!" |
| 25 | + echo "-- Continueing update..." |
| 26 | + svn up $TSINT_DIR |
| 27 | + echo "-- Update completed" |
| 28 | + TSINT_UPSTATE="successful" |
| 29 | + echo "" |
| 30 | + echo "-- Logging:" |
| 31 | + |
| 32 | +else |
| 33 | + echo "-- UPDATE ABORTED: Local changes found!" |
| 34 | + echo " Please commit them from your account and/or revert" |
| 35 | + echo " working copy with 'svn revert $TSINT_DIR --recursive'" |
| 36 | + echo "" |
| 37 | + echo "svn diff:" |
| 38 | + echo "$TSINT_DIFF" |
| 39 | + echo "" |
| 40 | + echo "-- Logging:" |
| 41 | +fi; |
| 42 | + |
| 43 | +TSINT_DATE=`date +%Y-%m-%d\ %H:%M:%S` |
| 44 | +TSINT_LOGMSG="$TSINT_DATE (UTC): $SUDO_USER ran a $TSINT_UPSTATE update from $TSINT_REV to `svnversion $TSINT_DIR`" |
| 45 | +echo "$TSINT_LOGMSG" >> $TSINT_UPLOG |
| 46 | +echo "$TSINT_LOGMSG |
| 47 | +" |
\ No newline at end of file |
Property changes on: trunk/tools/ToolserverI18N/scripts/tsIntUpdate |
___________________________________________________________________ |
Added: svn:executable |
1 | 48 | + * |