]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid reference to unset shell variable.
authorBruno Haible <bruno@clisp.org>
Fri, 13 May 2011 01:08:28 +0000 (03:08 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Jun 2011 21:39:48 +0000 (23:39 +0200)
gettext-runtime/src/ChangeLog
gettext-runtime/src/gettext.sh.in

index 8c2d8e3c6c008165e3d9ec6844f17284f8a88154..54bfca3500646e95a15e4438884a6578f8ccb743 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-12  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.sh.in: Avoid reference to unset shell variable ZSH_VERSION.
+       Reported by Thorsten Kampe <thorsten@thorstenkampe.de>.
+
 2010-06-04  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.18.1 released.
index 5c2c10785012a650c4808421efaa7fa38ade42cc..7e415dc80b97c38afc34dce05fb616fc4baec136 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2007, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU Library General Public License as published
@@ -40,7 +40,7 @@ fi
 # $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
 # the Filesystem Hierarchy Standard when doing so, this script is executable.
 # Therefore it needs to support the standard --help and --version.
-if test -z "$ZSH_VERSION"; then
+if test -z "${ZSH_VERSION+set}"; then
   # zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
   # it sets $0 to "gettext.sh", defeating the purpose of this test. But
   # fortunately we know that when running under zsh, this script is always