changeset 7168:56632b3512af

Make it work also with Solaris /bin/sh.
author Bruno Haible <bruno@clisp.org>
date Mon, 21 Aug 2006 13:30:55 +0000
parents bcf46de00b80
children cb505deddb22
files ChangeLog gnulib-tool
diffstat 2 files changed, 19 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-21  Mark D. Baushke  <mdb@gnu.org>
+            Bruno Haible <bruno@clisp.org>
+
+	* gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
+	/bin/sh understanding of '!' conditional negation.
+
 2006-08-21  Jim Meyering  <jim@meyering.net>
 
 	* modules/openat (Depends-on): Really alphabetize.
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-08-15 11:52:39 $'
+cvsdatestamp='$Date: 2006-08-21 13:30:55 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -629,15 +629,18 @@
 # verifies a module name
 func_verify_module ()
 {
-  if ! { test -f "$gnulib_dir/modules/$module" \
-         || { test -n "$local_gnulib_dir" && test -d "$local_gnulib_dir/modules" \
-              && test -f "$local_gnulib_dir/modules/$module"; }; } \
-     || test "CVS" = "$module" \
-     || test "ChangeLog" = "$module" \
-     || test "COPYING" = "$module" \
-     || test "README" = "$module" \
-     || test "TEMPLATE" = "$module" \
-     || test "TEMPLATE-TESTS" = "$module"; then
+  if { test -f "$gnulib_dir/modules/$module" \
+       || { test -n "$local_gnulib_dir" && test -d "$local_gnulib_dir/modules" \
+            && test -f "$local_gnulib_dir/modules/$module"; }; } \
+     && test "CVS" != "$module" \
+     && test "ChangeLog" != "$module" \
+     && test "COPYING" != "$module" \
+     && test "README" != "$module" \
+     && test "TEMPLATE" != "$module" \
+     && test "TEMPLATE-TESTS" != "$module"; then
+    # OK, $module is a correct module name.
+    :
+  else
     echo "gnulib-tool: module $module doesn't exist" 1>&2
     module=
   fi