Hello, Here is a reworked patch and ChangeLog based on your advices/ideas. In my tests quotes, *, ? and spaces are now accepted in file names, but not backslashes.
I used the short option -T for consistency with the other calls to tar. I have noticed that there are already tar calls with -- which seems to be an extension, at least it does not seems to be present in solaris tar. -- Pat
diff --git a/ChangeLog b/ChangeLog index da748f4f3d..7f40b7c6b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-01-27 Patrice Dumas <pertu...@free.fr> + + gendocs: allow spaces, metacharacters and quotes in source file names + * build-aux/gendocs.sh: output files to tar stdin and use -T- to allow + spaces, metacharacters and quotes in file names. Bruno Haible + solution. + 2024-01-27 Patrice Dumas <pertu...@free.fr> gendocs: fix --no-html diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh index 779b4840e5..605c7e3194 100755 --- a/build-aux/gendocs.sh +++ b/build-aux/gendocs.sh @@ -417,8 +417,8 @@ printf "\nMaking .tar.gz for sources...\n" d=`dirname $srcfile` ( cd "$d" - srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true - tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles + ls -d *.texinfo *.texi *.txi *.eps "$source_extra" 2>/dev/null \ + | tar -czhf "$abs_outdir/$PACKAGE.texi.tar.gz" -T- ls -l "$abs_outdir/$PACKAGE.texi.tar.gz" ) texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`