mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-25 20:30:11 +08:00
0ebbcb1bd6
2001-06-25 Phil Edwards <pme@sources.redhat.com> * update_version: Add command-line argument capability, also bump version for libstdc++-v3, and exit with the return code from the cvs commit. * crontab: Call update_version with arguments instead of calling update_branch_version. * update_branch_version: Remove. From-SVN: r43555
42 lines
1.0 KiB
Bash
Executable File
42 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Run this from /tmp.
|
|
CVSROOT=/cvs/gcc
|
|
export CVSROOT
|
|
/bin/rm -rf /tmp/$$
|
|
/bin/mkdir /tmp/$$
|
|
cd /tmp/$$
|
|
|
|
# ARGS is passed to 'cvs co'
|
|
ARGS="$*"
|
|
CURR_DATE=`/bin/date +"%Y%m%d"`
|
|
|
|
# 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"
|
|
|
|
# version is contained within a #define
|
|
cppdefine_FILES="gcc/libstdc++-v3/include/bits/c++config"
|
|
|
|
/usr/local/bin/cvs co $ARGS $textstring_FILES $cppdefine_FILES
|
|
|
|
for file in $textstring_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
|
|
|
|
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=$?
|
|
|
|
/bin/rm -rf /tmp/$$
|
|
exit $commit_results
|
|
|