summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-05-03 10:09:20 +0200
committerJim Meyering <meyering@redhat.com>2011-05-03 10:15:13 +0200
commit4b28ff7f32b1131c3a2e2fc560db32794b592d99 (patch)
tree190fe9f8ec08867ced8d876695a4e66c565776f7 /bootstrap
parentefa479c1e5e3cef6d31a6b4adde14d6a86e1d62e (diff)
downloadcoreutils-4b28ff7f32b1131c3a2e2fc560db32794b592d99.tar.xz
build: avoid bootstrap failure when $GZIP is set
Running "GZIP=-9 ./bootstrap" would fail right away, because the tool-version-checking code would treat the upper-cased program name as an environment variable name and if that has a value use the result as the application name. That works fine for automake, autoconf, etc. but not for gzip. * bootstrap (check_versions): Do not treat $GZIP as a program name. If defined at all, it is supposed to list gzip options. Reported by Alan Curry in http://debbugs.gnu.org/8609
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap7
1 files changed, 5 insertions, 2 deletions
diff --git a/bootstrap b/bootstrap
index f004ad326..c45ae4873 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2011-03-03.12; # UTC
+scriptversion=2011-05-03.08; # UTC
# Bootstrap this package from checked-out sources.
@@ -405,7 +405,10 @@ check_versions() {
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
test "$appvar" = TAR && appvar=AMTAR
- eval "app=\${$appvar-$app}"
+ case $appvar in
+ GZIP) ;; # Do not use $GZIP: it contains gzip options.
+ *) eval "app=\${$appvar-$app}" ;;
+ esac
inst_ver=$(get_version $app)
if [ ! "$inst_ver" ]; then
echo "$me: Error: '$app' not found" >&2