Mercurial > hg > CbC > CbC_gcc
annotate maintainer-scripts/update_version_svn @ 75:3c5ea37d9068
update gcc to gcc-4.6
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 22 Aug 2011 04:01:01 +0900 |
parents | f6334be47118 |
children | 04ced10e8804 |
rev | line source |
---|---|
0 | 1 #!/bin/sh |
2 # | |
3 # Update the current version date in all files in the tree containing | |
4 # it. Consider all release branches except those matching the regular | |
5 # expression in $IGNORE_BRANCHES, and also consider those branches listed | |
6 # in the space separated list in $ADD_BRANCHES. | |
7 | |
8 SVNROOT=${SVNROOT:-"file:///svn/gcc"} | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
9 IGNORE_BRANCHES='gcc-(2_95|3_0|3_1|3_2|3_3|3_4|4_0|4_1|4_2)-branch' |
0 | 10 ADD_BRANCHES='HEAD' |
11 | |
12 # Run this from /tmp. | |
13 export SVNROOT | |
14 /bin/rm -rf /tmp/$$ | |
15 /bin/mkdir /tmp/$$ | |
16 cd /tmp/$$ | |
17 | |
18 SVN=${SVN:-/usr/bin/svn} | |
19 | |
20 # Compute the branches which we should update. | |
21 BRANCHES=`$SVN ls $SVNROOT/branches \ | |
22 | sed -e 's/\///' \ | |
23 | egrep 'gcc-[0-9]+_[0-9]+-branch$' \ | |
24 | egrep -v $IGNORE_BRANCHES` | |
25 # Always update the mainline. | |
26 BRANCHES="${BRANCHES} ${ADD_BRANCHES}" | |
27 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
28 # This is put into the datestamp files. |
0 | 29 CURR_DATE=`/bin/date +"%Y%m%d"` |
30 | |
31 datestamp_FILES="gcc/DATESTAMP" | |
32 | |
33 | |
34 # Assume all will go well. | |
35 RESULT=0 | |
36 for BRANCH in $BRANCHES; do | |
37 echo "Working on \"$BRANCH\"." | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
38 # Check out the files on the branch. HEAD is in a different namespace. |
0 | 39 if test "$BRANCH" = HEAD; then |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
40 SVNROOT2=${SVNROOT}/trunk |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
41 else |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
42 SVNROOT2=${SVNROOT}/branches/${BRANCH} |
0 | 43 fi |
44 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
45 for i in $datestamp_FILES; do |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
46 ${SVN} -q co -N ${SVNROOT2}/`dirname $i` `basename $i` |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
47 done |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
48 |
0 | 49 # There are no files to commit yet. |
50 COMMIT_FILES="" | |
51 | |
52 for file in $datestamp_FILES; do | |
53 dirname=`basename $file` | |
54 file=`basename $file` | |
55 file="$dirname/$file" | |
56 if test -f $file; then | |
57 echo ${CURR_DATE} > $file.new | |
58 | |
59 if /usr/bin/cmp -s $file $file.new; then | |
60 rm -f $file.new | |
61 else | |
62 mv -f $file.new $file | |
63 COMMIT_FILES="$COMMIT_FILES $file" | |
64 fi | |
65 fi | |
66 done | |
67 | |
68 if test -n "$COMMIT_FILES"; then | |
69 for i in $COMMIT_FILES; do | |
70 echo "Attempting to commit $i" | |
71 if ! ${SVN} commit -m "Daily bump." $i; then | |
72 # If we could not commit the files, indicate failure. | |
73 RESULT=1 | |
74 fi | |
75 done | |
76 fi | |
77 | |
78 # Remove the files. | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
79 for i in $datestamp_FILES; do |
0 | 80 rm -rf /tmp/$$/`basename $i` |
81 done | |
82 done | |
83 | |
84 /bin/rm -rf /tmp/$$ | |
85 exit $RESULT |