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

Sebastian Rahtz sebastian.rahtz at computing-services.oxford.ac.uk
Fri Mar 21 09:51:50 CET 2003


consider the shell script below. it takes a series of zip files
and should, for each one,
 * unzip everything except binaries
 * unzip selected binaries according to what is in $all_systems.

but it does not work. the "-x $filters" just produces

  caution: excluded filename not matched:  bin\*

why? what am I doing wrong? how do I persuade unzip to
ignore everything under bin? remembering that the bin
directories do exist, and may have files in them, so wildcards
will get expanded by the shell if it gets a chance

----------------------
echo "Now copying selected packages from the lists in $work_dir... " >&2
  filters="bin\* "
  
  for f in `cat $work_dir/*.*list | sort | uniq`
  do
  if test -f $CDDIR/tpm/$f
  then
   echo "Install files from $f" >&2
   (cd $TEXDIR; unzip -o -q $CDDIR/tpm/$f -x $filters)
   echo " for architectures:" >&2
    for p in $all_systems; do
      eval \$p_${p}_s || continue
      eval name=\"\$p_${p}_n\"
      P=`echo $p | sed -e 's/_/-/' `
      echo "  $name  ($P)" >&2
      (cd $TEXDIR; unzip -o -qq $CDDIR/tpm/$f "bin/$P/*")
    done
  fi
 done
 echo "Done copying." >&2

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



More information about the tex-live mailing list