Mercurial > cgi-bin > hgwebdir.cgi > VMS > 2__runs_and_data
comparison scripts/repo_update_helper.sh @ 13:c93fb902a754
Vthread kmeans console line exploration for backup tuning
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Fri, 03 Feb 2012 16:52:11 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:e82254b9cceb |
|---|---|
| 1 #! /bin/sh | |
| 2 | |
| 3 #finds all from the current point in the directory tree | |
| 4 function find_repos() | |
| 5 { | |
| 6 FOUND_REPOS=$(find . -type d | grep -e ".hg$" | sed "s/\.hg//g") | |
| 7 echo -e $FOUND_REPOS | |
| 8 } | |
| 9 | |
| 10 function print_info() | |
| 11 { | |
| 12 echo -e "\n>> $1" | |
| 13 } | |
| 14 | |
| 15 function update_repos() | |
| 16 { | |
| 17 if [ -z "$1" ] | |
| 18 then | |
| 19 TAG="tip" | |
| 20 else | |
| 21 TAG=$1 | |
| 22 fi | |
| 23 REPOS=$( cat << EOF | |
| 24 ./ | |
| 25 ./src/VPThread_lib/ | |
| 26 ./src/VPThread_lib/VMS/ | |
| 27 ./src/VPThread_lib/VMS/DynArray/ | |
| 28 ./src/VPThread_lib/VMS/Histogram/ | |
| 29 ./src/VPThread_lib/VMS/Queue_impl/ | |
| 30 ./src/VPThread_lib/VMS/Hash_impl/ | |
| 31 EOF | |
| 32 ) | |
| 33 | |
| 34 BASE_DIR=$(pwd) | |
| 35 | |
| 36 for DIR in $REPOS | |
| 37 do | |
| 38 cd $DIR | |
| 39 hg pull | |
| 40 hg update $TAG | |
| 41 if [ $? -ne 0 ] | |
| 42 then | |
| 43 echo ">> Falling back from Tag to V0 checkout" | |
| 44 hg update V0 | |
| 45 if [ $? -ne 0 ] | |
| 46 then | |
| 47 echo ">> Falling back from Tag to Tip checkout" | |
| 48 hg update tip | |
| 49 fi | |
| 50 fi | |
| 51 cd $BASE_DIR | |
| 52 done | |
| 53 } |
