Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/maintainer-scripts/update_version_git

36 lines
742 B
Text
Raw Permalink Normal View History

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