From a06e9a40751dd3c4c87d35a821f7c9281fa71644 Mon Sep 17 00:00:00 2001 From: Olaf Meeuwissen Date: Mon, 12 Jun 2017 20:53:53 +0900 Subject: [PATCH] Script updating of upstream files --- doc/releases.txt | 7 +++++-- tools/update-upstream.sh | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 tools/update-upstream.sh diff --git a/doc/releases.txt b/doc/releases.txt index 170bff571..9b975f1e5 100644 --- a/doc/releases.txt +++ b/doc/releases.txt @@ -20,8 +20,11 @@ Before the release: ls | while read aa; do git log --follow --diff-filter=A --find-renames=40% --format="%ai $aa" "$aa"; done > foo.log Then inspect foo.log for any files added since the last release. -* Make sure that config.guess and config.sub are up-to-date (get them from - savannah.gnu.org/projects/config) (git clone is easiest) +* Make sure that upstream files are up-to-date by running: + + ./tools/update-upstream.sh + + Requires curl or wget. * configure.ac: remove 'git' from textual version number, and increment it * run autoreconf --force but do *NOT* use the --install option as it will overwrite our custom ltmain.sh diff --git a/tools/update-upstream.sh b/tools/update-upstream.sh new file mode 100755 index 000000000..4c5b440f6 --- /dev/null +++ b/tools/update-upstream.sh @@ -0,0 +1,21 @@ +#!/bin/sh -u +# tools/update-upstream.sh -- files to their latest version +# Copyright (C) 2017 Olaf Meeuwissen +# +# License: GPL-3.0+ + +fetch () { + if type curl 2>/dev/null >/dev/null ; then + curl --silent --remote-name $1 + return + fi + if type wget 2>/dev/null >/dev/null ; then + wget --quiet --output-document $(echo $1 | sed 's,.*/,,') $1 + fi +} + +CONFIG_BASE_URL=http://git.savannah.gnu.org/cgit/config.git/plain + +for file in config.guess config.sub; do + fetch $CONFIG_BASE_URL/$file +done