Mercurial > cgi-bin > hgwebdir.cgi > VMS > 2__runs_and_data
view scripts/repo_update_helper.sh @ 25:078abaff1bc3
VSs SCG ver
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 28 Aug 2012 13:34:25 +0200 |
| parents | |
| children |
line source
1 #! /bin/sh
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 }
10 function print_info()
11 {
12 echo -e "\n>> $1"
13 }
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 )
34 BASE_DIR=$(pwd)
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 }
