2020-01-13 13:29:02 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2020-05-27 10:24:09 +02:00
|
|
|
# Update the current version date in DATESTAMP files and generate
|
|
|
|
# ChangeLog file entries since the last DATESTAMP update from the
|
|
|
|
# commit messages.
|
2020-01-13 13:29:02 +01:00
|
|
|
|
|
|
|
GITROOT=${GITROOT:-"/git/gcc.git"}
|
2020-12-17 00:14:30 +01:00
|
|
|
if [ -z "$TMPDIR" ]; then
|
|
|
|
if [ -d /sourceware/snapshot-tmp/gcc ]; then
|
|
|
|
TMPDIR=/sourceware/snapshot-tmp/gcc
|
|
|
|
else
|
|
|
|
TMPDIR=/tmp
|
|
|
|
fi
|
|
|
|
fi
|
2020-01-13 13:29:02 +01:00
|
|
|
|
2020-12-17 00:14:30 +01:00
|
|
|
# Run this from $TMPDIR.
|
|
|
|
export GITROOT TMPDIR
|
2020-05-27 10:24:09 +02:00
|
|
|
BASEDIR=`mktemp -d`
|
2020-01-13 13:29:02 +01:00
|
|
|
cd "$BASEDIR"
|
|
|
|
|
|
|
|
GIT=${GIT:-/usr/local/bin/git}
|
|
|
|
|
|
|
|
# Assume all will go well.
|
2020-12-17 00:14:30 +01:00
|
|
|
SUBDIR="$BASEDIR/gcc"
|
2020-05-27 10:24:09 +02:00
|
|
|
${GIT} clone -q -b master "$GITROOT" "$SUBDIR"
|
2020-01-13 13:29:02 +01:00
|
|
|
|
2020-12-17 00:14:30 +01:00
|
|
|
cp -a "$SUBDIR"/contrib/gcc-changelog "$BASEDIR"/gcc-changelog
|
2020-05-27 10:24:09 +02:00
|
|
|
cd "$SUBDIR"
|
|
|
|
python3 ../gcc-changelog/git_update_version.py -p
|
|
|
|
RESULT=$?
|
2020-01-13 13:29:02 +01:00
|
|
|
|
2020-12-17 00:14:30 +01:00
|
|
|
cd "$TMPDIR"
|
2020-01-13 13:29:02 +01:00
|
|
|
|
2020-12-17 00:14:30 +01:00
|
|
|
/bin/rm -rf "$BASEDIR"
|
2020-01-13 13:29:02 +01:00
|
|
|
exit $RESULT
|