From f84bc2f51a1a81b7c7c14f1ed0a2d56b4d70fa40 Mon Sep 17 00:00:00 2001 From: Chris Conway Date: Tue, 1 Dec 2015 11:36:07 -0800 Subject: Adds attempt to download config.guess to get-antlr-3.4 script. This should work around the case where autogen.sh hasn't been run, as long as the download succeeds. --- contrib/get-antlr-3.4 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'contrib/get-antlr-3.4') diff --git a/contrib/get-antlr-3.4 b/contrib/get-antlr-3.4 index 436ef6a8d..6a36681cb 100755 --- a/contrib/get-antlr-3.4 +++ b/contrib/get-antlr-3.4 @@ -27,11 +27,17 @@ function webget { if [ -z "${MACHINE_TYPE}" ]; then if ! [ -e config/config.guess ]; then - echo "$(basename $0): I need the file config/config.guess to tell MACHINE_TYPE" >&2 - echo "Try running ./autogen.sh, or set the MACHINE_TYPE environment variable." >&2 - exit 1 + # Attempt to download once + webget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' config/config.guess + if [ -e config/config.guess ]; then + chmod +x config/config.guess + else + echo "$(basename $0): I need the file config/config.guess to tell MACHINE_TYPE" >&2 + echo "Try running ./autogen.sh, or set the MACHINE_TYPE environment variable" >&2 + echo "(e.g., \"export MACHINE_TYPE=x86_64\")." >&2 + exit 1 + fi fi - # get first nibble from config.guess (x86_64, i686, ...) MACHINE_TYPE=`config/config.guess | sed 's,-.*,,'` fi -- cgit v1.2.3