Make config.sub and config.guess +w before download

pull/723/head
Jeffrey Walton 2018-09-09 14:28:52 -04:00
parent edbd57a41f
commit fc5a73186f
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 11 additions and 0 deletions

View File

@ -68,11 +68,13 @@ if [[ -z $(command -v autoreconf) ]]; then
echo "Cannot find autoreconf. Things may fail."
fi
echo "Running autoupdate"
if ! autoupdate 2>/dev/null; then
echo "autoupdate failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
echo "Running libtoolize"
if ! "$LIBTOOLIZE" 2>/dev/null; then
echo "libtoolize failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
@ -80,6 +82,7 @@ fi
# Run autoreconf twice on failure. Also see
# https://github.com/tracebox/tracebox/issues/57
echo "Running autoreconf"
if ! autoreconf 2>/dev/null; then
echo "autoreconf failed, running again."
if ! autoreconf -fi; then
@ -88,6 +91,14 @@ if ! autoreconf 2>/dev/null; then
fi
fi
# Sparc need +w
if [[ -e config.sub ]]; then
chmod +w config.sub
fi
if [[ -e config.guess ]]; then
chmod +w config.guess
fi
# Update config.sub config.guess. GNU recommends using the latest for all projects.
echo "Updating config.sub"
wget --no-check-certificate 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub' -O config.sub