From: Bruno Haible Date: Fri, 12 Apr 2024 12:31:18 +0000 (+0200) Subject: gnulib-tool-tests: Fix trouble caused by empty directories. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=debd28610525a251f3ae1f619a8ca1b98476861d;p=gnulib%2Fmaint-tools.git gnulib-tool-tests: Fix trouble caused by empty directories. --- diff --git a/gnulib-tool-tests/init.sh b/gnulib-tool-tests/init.sh index 14d4e20c..03d84835 100644 --- a/gnulib-tool-tests/init.sh +++ b/gnulib-tool-tests/init.sh @@ -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