diff options
author | Bruno Haible <bruno@clisp.org> | 2010-02-25 12:13:28 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-02-25 12:13:28 +0100 |
commit | 80cd995cdcbf4b9ded895a43621a11f11806ad8d (patch) | |
tree | 6f91d6fd91b1eafc994c7c5de09733abc67ff9b2 /gnulib-tool | |
parent | 108cfb803174abf17eb101e9999b9d1a642ce1ba (diff) | |
download | gnulib-80cd995cdcbf4b9ded895a43621a11f11806ad8d.tar.gz |
Fix breakage of gnulib-tool with ksh, introduced on 2010-02-21.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-x | gnulib-tool | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gnulib-tool b/gnulib-tool index ba41b6180b..259bb74400 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -727,7 +727,10 @@ fi # For bash >= 2.0: define echo to a function that uses the printf built-in. # For bash < 2.0: define echo to a function that uses cat of a here document. # (There is no win in using 'printf' over 'cat' if it is not a shell built-in.) -if test -z "$have_echo" \ +# Also handle problem 2, specific to bash 3.2, here. +if { test -z "$have_echo" \ + || case "$BASH_VERSION" in 3.2*) true;; *) false;; esac; \ + } \ && test -n "$BASH_VERSION"; then \ if type printf 2>/dev/null | grep / > /dev/null; then # 'printf' is not a shell built-in. @@ -810,15 +813,6 @@ if test -z "$have_echo" \ exec /bin/sh "$0" --no-reexec "$@" exit 127 fi -# Now handle problem 2, specific to bash 3.2. -case "$BASH_VERSION" in - 3.2*) - echo () - { - printf '%s\n' "$*" - } - ;; -esac if test -z "$have_echo"; then func_fatal_error "Shell does not support 'echo' correctly. Please install GNU bash and set the environment variable CONFIG_SHELL to point to it." fi |