[tex-live] help with unzip and sh and wildcards

Harald Hanche-Olsen hanche at math.ntnu.no
Fri Mar 21 11:54:14 CET 2003


+ Sebastian Rahtz <sebastian.rahtz at computing-services.oxford.ac.uk>:

| but it does not work. the "-x $filters" just produces
| 
|   caution: excluded filename not matched:  bin\*
| 
| ----------------------
| echo "Now copying selected packages from the lists in $work_dir... " >&2
|   filters="bin\* "

Shouldn't that be
    filters="bin/*"
instead?  At first I thought you had been overzeaulous in protecting
the * from the shell by escaping it with a backslash, but then I
realized you must have been thinking like a Windows user instead.
Well, if you really were thinking of escaping it, maybe you were
thinking like a csh user.  But the Bourne shell does not expand
wildcards in variables the way csh does.

|    (cd $TEXDIR; unzip -o -q $CDDIR/tpm/$f -x $filters)

FWIW, the version of unzip that I have does not support this exclusion
option.  The manual page for the unzip I have here says

       -x  extract files in archive (default)

So, unless you distribute your own version of unzip, I doubt there is
a portable way to achieve what you want to do.  The usual solution on
Unix systems is to use compressed tar files instead.

- Harald


More information about the tex-live mailing list