summaryrefslogtreecommitdiff
path: root/maintainer-scripts/update_branch_version
blob: 88b05643793327ea1062fc4078e744f60ecc4d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh 

# Run this from /tmp.
CVSROOT=/cvs/gcc
export CVSROOT
BRANCH=gcc-3_0-branch
export BRANCH
/bin/rm -rf /tmp/$$
/bin/mkdir /tmp/$$
cd /tmp/$$

CURR_DATE=`/bin/date +"%Y%m%d"`

FILES="gcc/gcc/version.c gcc/gcc/f/version.c gcc/libf2c/libF77/Version.c gcc/libf2c/libI77/Version.c gcc/libf2c/libU77/Version.c"

/usr/local/bin/cvs co -r$BRANCH $FILES

for file in $FILES; do

  OLD_VERSION=`/bin/cat $file`
  /bin/sed -e "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <<HERE
$OLD_VERSION
HERE
done

/usr/local/bin/cvs commit -m "Bump dates." $FILES

/bin/rm -rf /tmp/$$