Hello Mark, everyone, I'm all for making gnulib-tool portable in practice (and not only in theory), if only to avoid further such bug reports; but this patch definitely changes the semantics (the `!' "binds" higher than `||', if one can reasonably speak about "binding" in shell grammar).
Suggested patch below. OK? Cheers, Ralf * Mark D. Baushke wrote on Mon, Aug 21, 2006 at 09:56:41AM CEST: > --- gnulib-tool 15 Aug 2006 11:52:39 -0000 1.137 > +++ gnulib-tool 21 Aug 2006 07:35:26 -0000 > @@ -629,7 +629,7 @@ func_all_modules () > # verifies a module name > func_verify_module () > { > - if ! { test -f "$gnulib_dir/modules/$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" \ > @@ -637,7 +637,7 @@ func_verify_module () > || test "COPYING" = "$module" \ > || test "README" = "$module" \ > || test "TEMPLATE" = "$module" \ > - || test "TEMPLATE-TESTS" = "$module"; then > + || test "TEMPLATE-TESTS" = "$module"; then :; else > echo "gnulib-tool: module $module doesn't exist" 1>&2 > module= > fi * gnulib-tool (func_verify_module): Rewrite logic not to use `!', which is Posix but not portable to Solaris sh. Report by Mark D. Baushke <[EMAIL PROTECTED]>. Index: gnulib-tool =================================================================== RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v retrieving revision 1.137 diff -u -r1.137 gnulib-tool --- gnulib-tool 15 Aug 2006 11:52:39 -0000 1.137 +++ gnulib-tool 21 Aug 2006 08:17:34 -0000 @@ -629,15 +629,14 @@ # verifies a module name func_verify_module () { - if ! { test -f "$gnulib_dir/modules/$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 + && test -f "$local_gnulib_dir/modules/$module"; }; } && + case $module in + CVS | ChangeLog | COPYING | README | TEMPLATE | TEMPLATE-TESTS) false;; + *) :;; + esac + then :; else echo "gnulib-tool: module $module doesn't exist" 1>&2 module= fi