]>
Commit | Line | Data |
---|---|---|
18cb6ac2 JM |
1 | #!/bin/sh |
2 | # | |
79ea774f JJ |
3 | # Update the current version date in DATESTAMP files and generate |
4 | # ChangeLog file entries since the last DATESTAMP update from the | |
5 | # commit messages. | |
18cb6ac2 JM |
6 | |
7 | GITROOT=${GITROOT:-"/git/gcc.git"} | |
f4ae1f2c JJ |
8 | if [ -z "$TMPDIR" ]; then |
9 | if [ -d /sourceware/snapshot-tmp/gcc ]; then | |
10 | TMPDIR=/sourceware/snapshot-tmp/gcc | |
11 | else | |
12 | TMPDIR=/tmp | |
13 | fi | |
14 | fi | |
18cb6ac2 | 15 | |
f4ae1f2c JJ |
16 | # Run this from $TMPDIR. |
17 | export GITROOT TMPDIR | |
79ea774f | 18 | BASEDIR=`mktemp -d` |
18cb6ac2 JM |
19 | cd "$BASEDIR" |
20 | ||
21 | GIT=${GIT:-/usr/local/bin/git} | |
22 | ||
18cb6ac2 | 23 | # Assume all will go well. |
f4ae1f2c | 24 | SUBDIR="$BASEDIR/gcc" |
79ea774f | 25 | ${GIT} clone -q -b master "$GITROOT" "$SUBDIR" |
18cb6ac2 | 26 | |
f4ae1f2c | 27 | cp -a "$SUBDIR"/contrib/gcc-changelog "$BASEDIR"/gcc-changelog |
79ea774f JJ |
28 | cd "$SUBDIR" |
29 | python3 ../gcc-changelog/git_update_version.py -p | |
30 | RESULT=$? | |
18cb6ac2 | 31 | |
f4ae1f2c | 32 | cd "$TMPDIR" |
18cb6ac2 | 33 | |
f4ae1f2c | 34 | /bin/rm -rf "$BASEDIR" |
18cb6ac2 | 35 | exit $RESULT |