]> Savannah Git Hosting - gnulib/maint-tools.git/commitdiff
gnulib-tool-tests: Fix trouble caused by empty directories.
authorBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2024 12:31:18 +0000 (14:31 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2024 12:31:18 +0000 (14:31 +0200)
gnulib-tool-tests/init.sh

index 14d4e20cb1c29ed46ccf0c307b3d415b592dd872..03d8483557999754b074f875ca8d83533c0fd535 100644 (file)
@@ -151,10 +151,11 @@ do_import_test ()
       $GNULIB_SRCDIR/gnulib-tool --gnulib-dir="$gnulib_dir" $3
   ) >$tmp-out 2>$tmp-err
   rc=$?
-  # Remove empty build-aux dirs, since we cannot check them in as part of the expected result.
-  build_aux_dir=`find $tmp-result -name build-aux -type d -empty -print`
-  if test -n "$build_aux_dir"; then
-    rmdir $build_aux_dir
+  # Remove empty 'build-aux' or 'support' dirs, since we cannot check them in
+  # as part of the expected result.
+  empty_dirs=`find $tmp-result '(' -name build-aux -o -name support ')' -type d -empty -print`
+  if test -n "$empty_dirs"; then
+    rmdir $empty_dirs
   fi
   # Remove autom4te.cache directory, since it may depend on the Autoconf version or M4 version.
   rm -rf $tmp-result/"$2"/autom4te.cache