source: branches/libc-0.6/src/gcc/maintainer-scripts/update_version

Last change on this file was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.1 KB
Line 
1#!/bin/sh
2
3# Run this from /tmp.
4CVSROOT=${CVSROOT:-/cvs/gcc}
5export CVSROOT
6/bin/rm -rf /tmp/$$
7/bin/mkdir /tmp/$$
8cd /tmp/$$
9
10# The path to cvs.
11CVS=${CVS:-/usr/local/bin/cvs}
12
13# Compute the branches which we should update.
14$CVS co gcc/ChangeLog
15BRANCHES=`$CVS status -v gcc/ChangeLog \
16 | awk '{print $1;}' \
17 | egrep 'gcc-[0-9]+_[0-9]+-branch$'`
18# Always update the mainline.
19BRANCHES="${BRANCHES} HEAD"
20
21# ARGS is passed to 'cvs co'
22CURR_DATE=`/bin/date +"%Y%m%d"`
23
24# version is contained within a char*
25textstring_FILES="gcc/gcc/version.c gcc/gcc/ada/gnatvsn.ads gcc/gcc/f/version.c gcc/libf2c/libF77/Version.c gcc/libf2c/libI77/Version.c gcc/libf2c/libU77/Version.c"
26
27# version is contained within a #define
28cppdefine_FILES="gcc/libstdc++-v3/include/bits/c++config"
29
30# Assume all will go well.
31RESULT=0
32
33for BRANCH in $BRANCHES; do
34 # Check out the files on the branch. HEAD is a special case; if
35 # you check out files with -r HEAD, CVS will not let you check
36 # in changes.
37 if test "$BRANCH" = HEAD; then
38 ${CVS} co $textstring_FILES $cppdefine_FILES
39 else
40 ${CVS} co -r $BRANCH $textstring_FILES $cppdefine_FILES
41 fi
42
43 # There are no files to commit yet.
44 COMMIT_FILES=""
45
46 for file in $textstring_FILES; do
47 if test -f $file; then
48 /bin/sed <$file >$file.new -e \
49 "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/"
50
51 if /usr/bin/cmp -s $file $file.new; then
52 rm -f $file.new
53 else
54 mv -f $file.new $file
55 COMMIT_FILES="$COMMIT_FILES $file"
56 fi
57 fi
58 done
59
60 for file in $cppdefine_FILES; do
61 if test -f $file; then
62 /bin/sed <$file >$file.new -e \
63 "s/\(#.*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/"
64
65 if /usr/bin/cmp -s $file $file.new; then
66 rm -f $file.new
67 else
68 mv -f $file.new $file
69 COMMIT_FILES="$COMMIT_FILES $file"
70 fi
71 fi
72 done
73
74 if test -n "$COMMIT_FILES" \
75 && ! ${CVS} commit -m "Daily bump." $COMMIT_FILES; then
76 # If we could not commit the files, indicate failure.
77 RESULT=1
78 fi
79
80 # Remove the files.
81 rm -rf gcc
82done
83
84/bin/rm -rf /tmp/$$
85exit $RESULT
86
Note: See TracBrowser for help on using the repository browser.