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.
8 SVNROOT
=${SVNROOT:-"file:///svn/gcc"}
9 IGNORE_BRANCHES
='gcc-(2_95|3_0|3_1|3_2|3_3|3_4|4_0|4_1|4_2|4_3|4_4|4_5|4_6)-branch'
18 SVN
=${SVN:-/usr/bin/svn}
20 # Compute the branches which we should update.
21 BRANCHES
=`$SVN ls $SVNROOT/branches \
23 | egrep 'gcc-[0-9]+_[0-9]+-branch$' \
24 | egrep -v $IGNORE_BRANCHES`
25 # Always update the mainline.
26 BRANCHES
="${BRANCHES} ${ADD_BRANCHES}"
28 # This is put into the datestamp files.
29 CURR_DATE
=`/bin/date +"%Y%m%d"`
31 datestamp_FILES
="gcc/DATESTAMP"
34 # Assume all will go well.
36 for BRANCH
in $BRANCHES; do
37 echo "Working on \"$BRANCH\"."
38 # Check out the files on the branch. HEAD is in a different namespace.
39 if test "$BRANCH" = HEAD
; then
40 SVNROOT2
=${SVNROOT}/trunk
42 SVNROOT2
=${SVNROOT}/branches
/${BRANCH}
45 for i
in $datestamp_FILES; do
46 ${SVN} -q co
-N ${SVNROOT2}/`dirname $i` `basename $i`
49 # There are no files to commit yet.
52 for file in $datestamp_FILES; do
53 dirname=`basename $file`
56 if test -f $file; then
57 echo ${CURR_DATE} > $file.new
59 if /usr
/bin
/cmp -s $file $file.new
; then
63 COMMIT_FILES
="$COMMIT_FILES $file"
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.
79 for i
in $datestamp_FILES; do
80 rm -rf /tmp
/$$
/`basename $i`