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)-branch'
19 SVN
=${SVN:-/usr/bin/svn}
21 # Compute the branches which we should update.
22 BRANCHES
=`$SVN ls $SVNROOT/branches \
24 | egrep 'gcc-[0-9]+_[0-9]+-branch$' \
25 | egrep -v $IGNORE_BRANCHES`
26 # Always update the mainline.
27 BRANCHES
="${BRANCHES} ${ADD_BRANCHES}"
29 # ARGS is passed to 'cvs co'
30 CURR_DATE
=`/bin/date +"%Y%m%d"`
32 # version is all there is
33 datestamp_FILES
="gcc/DATESTAMP"
35 FILES
="$datestamp_FILES"
37 # Assume all will go well.
39 for BRANCH
in $BRANCHES; do
40 echo "Working on \"$BRANCH\"."
41 # Check out the files on the branch. HEAD is a special case; if
42 # you check out files with -r HEAD, CVS will not let you check
44 if test "$BRANCH" = HEAD
; then
46 ${SVN} -q co
-N ${SVNROOT}/trunk
/`dirname $i` `basename $i`
50 ${SVN} -q co -N ${SVNROOT}/branches/${BRANCH}/`dirname $i` `basename $i`
54 # There are no files to commit yet.
57 for file in $datestamp_FILES; do
58 dirname=`basename $file`
61 if test -f $file; then
62 echo ${CURR_DATE} > $file.new
64 if /usr
/bin
/cmp -s $file $file.new
; then
68 COMMIT_FILES
="$COMMIT_FILES $file"
73 if test -n "$COMMIT_FILES"; then
74 for i
in $COMMIT_FILES; do
75 echo "Attempting to commit $i"
76 if ! ${SVN} commit
-m "Daily bump." $i; then
77 # If we could not commit the files, indicate failure.
85 rm -rf /tmp
/$$
/`basename $i`