automake/sync_gnuconfig.sh
Petr Šabata 67b7f62a8f RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/automake#7640c908710e39b9fae6e1bccb181337759cabfc
2020-10-14 22:08:04 +02:00

34 lines
749 B
Bash
Executable File

#!/bin/bash
die() { echo >&2 "$@"; exit 1; }
lines=`git status --porcelain | grep -v ^?? | wc -l`
test "$lines" != "0" && die "stash the git changes"
if test -d config; then
cd config
git pull
cd ..
else
git clone git://git.savannah.gnu.org/config.git
fi
cp config/config.guess .
cp config/config.sub .
lines=`git status --porcelain config.guess config.sub | wc -l`
if test "$lines" = "0"; then
echo "no upstream change"
exit 0
fi
make -C config check || die "make check failed"
rpmdev-bumpspec automake.spec \
-c "update config.{guess,sub} to gnuconfig git HEAD" \
|| die "can not bump spec"
git add -f config.sub config.guess automake.spec
git commit -m "gnuconfig: sync with upstream git" --no-verify