2001-03-10 08:08:50 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Run this from /tmp.
|
|
|
|
CVSROOT=/cvs/gcc
|
|
|
|
export CVSROOT
|
|
|
|
/bin/rm -rf /tmp/$$
|
|
|
|
/bin/mkdir /tmp/$$
|
|
|
|
cd /tmp/$$
|
|
|
|
|
2001-06-26 03:26:25 +08:00
|
|
|
# ARGS is passed to 'cvs co'
|
|
|
|
ARGS="$*"
|
2001-03-10 08:08:50 +08:00
|
|
|
CURR_DATE=`/bin/date +"%Y%m%d"`
|
|
|
|
|
2001-06-26 03:26:25 +08:00
|
|
|
# version is contained within a char*
|
|
|
|
textstring_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"
|
2001-03-10 08:08:50 +08:00
|
|
|
|
2001-06-26 03:26:25 +08:00
|
|
|
# version is contained within a #define
|
|
|
|
cppdefine_FILES="gcc/libstdc++-v3/include/bits/c++config"
|
2001-03-10 08:08:50 +08:00
|
|
|
|
2001-06-26 03:26:25 +08:00
|
|
|
/usr/local/bin/cvs co $ARGS $textstring_FILES $cppdefine_FILES
|
2001-03-10 08:08:50 +08:00
|
|
|
|
2001-06-26 03:26:25 +08:00
|
|
|
for file in $textstring_FILES; do
|
2001-03-10 08:08:50 +08:00
|
|
|
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
|
|
|
|
|
2001-06-26 03:26:25 +08:00
|
|
|
for file in $cppdefine_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 "Daily bump." $textstring_FILES $cppdefine_FILES
|
|
|
|
commit_results=$?
|
2001-03-10 08:08:50 +08:00
|
|
|
|
|
|
|
/bin/rm -rf /tmp/$$
|
2001-06-26 03:26:25 +08:00
|
|
|
exit $commit_results
|
|
|
|
|