Home | History | Annotate | Line # | Download | only in maintainer-scripts
      1 #!/bin/sh
      2 #
      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.
      6 
      7 GITROOT=${GITROOT:-"/git/gcc.git"}
      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
     15 
     16 # Run this from $TMPDIR.
     17 export GITROOT TMPDIR
     18 BASEDIR=`mktemp -d`
     19 cd "$BASEDIR"
     20 
     21 GIT=${GIT:-/usr/local/bin/git}
     22 
     23 # Assume all will go well.
     24 SUBDIR="$BASEDIR/gcc"
     25 ${GIT} clone -q -b master "$GITROOT" "$SUBDIR"
     26 
     27 cp -a "$SUBDIR"/contrib/gcc-changelog "$BASEDIR"/gcc-changelog
     28 cd "$SUBDIR"
     29 python3 ../gcc-changelog/git_update_version.py -p
     30 RESULT=$?
     31 
     32 cd "$TMPDIR"
     33 
     34 /bin/rm -rf "$BASEDIR"
     35 exit $RESULT
     36