2017-06-12 11:53:53 +00:00
|
|
|
#!/bin/sh -u
|
2019-06-29 08:29:15 +00:00
|
|
|
# tools/update-upstreams.sh -- files to their latest version
|
|
|
|
# Copyright (C) 2017, 2019 Olaf Meeuwissen
|
2017-06-12 11:53:53 +00:00
|
|
|
#
|
|
|
|
# License: GPL-3.0+
|
|
|
|
|
|
|
|
fetch () {
|
|
|
|
if type curl 2>/dev/null >/dev/null ; then
|
2019-12-02 11:40:20 +00:00
|
|
|
curl --location --remote-name $1
|
2017-06-12 11:53:53 +00:00
|
|
|
return
|
|
|
|
fi
|
|
|
|
if type wget 2>/dev/null >/dev/null ; then
|
2019-12-02 11:40:20 +00:00
|
|
|
wget --output-document $(echo $1 | sed 's,.*/,,') $1
|
2017-06-12 11:53:53 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-06-29 08:29:15 +00:00
|
|
|
CONFIG_BASE_URL=https://git.savannah.gnu.org/cgit/config.git/plain
|
2017-06-12 11:53:53 +00:00
|
|
|
|
|
|
|
for file in config.guess config.sub; do
|
|
|
|
fetch $CONFIG_BASE_URL/$file
|
|
|
|
done
|