fileset

git mirror of https://ccx.te2000.cz/bzr/fileset
git clone https://ccx.te2000.cz/git/fileset
Log | Files | Refs | README

fsapply (290B)


      1 #!/bin/sh
      2 if getopts x o; then
      3 	opt=-$o
      4 	shift
      5 else
      6 	opt=""
      7 fi
      8 if ! test -d $1; then
      9 	printf '%s\n' >&2 "supply directory argument (got '$1')"
     10 	exit 2
     11 fi
     12 cd "$1" || exit $?
     13 shift
     14 if test -n "$opt"; then
     15 	fileset "$@" | ${FILESET_SHELL:-sh} $opt
     16 else
     17 	fileset "$@" | ${FILESET_SHELL:-sh}
     18 fi