bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch to quote files in source archive setup


From: Bruno Haible
Subject: Re: patch to quote files in source archive setup
Date: Sat, 27 Jan 2024 17:35:10 +0100

Patrice Dumas wrote:
> I can propose a patch with --files-from instead, it should be simpler
> and avoid the intermediate read, I believe.

Yes please.

> >   src_list=`ls -d *.texinfo *.texi *.txi *.eps "$source_extra" 2>/dev/null` 
> > || true

Also, GNU ls, by default, obeys an environment variable QUOTING_STYLE.
You should better set it to empty for this call to 'ls'. Or avoid 'ls' entirely,
through a loop like
  for src_file in *.texinfo *.texi *.txi *.eps "$source_extra"
  do
    ...
  done

> This cannot be simplified that way, as the pipe starts a subshell and
> then the variable set inside the while loop is not available after the
> while.

Ah, I see. Forcing the first part of the pipe into a subshell, so that the
second part can stay in the main shell, would require file-descriptor
shuffling ('exec 0<&5 5<&-' and such). This becomes ugly.

> I only tested with files with spaces as I think that it is the most
> plausible use-case.  My wild guess is that * and ?  will be protected,
> but probably not quotes, and I have no idea about backslashes and
> non-ASCII characters.  I can test, though.

Yes, if there is still an 'eval' in the final patch, it would be good to
know which file names will work and which will cause havoc.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]