#!/bin/bash # the twelf directory, must contain sudirectory bin BIN=`dirname $0` # takes arguments like the find tool and checks the found files, prints a report at the end # if the first two arguments are -omdoc DIR, all files are converted to OMDoc and stored in directory DIR # otherwise the files are only checked if [ $1 = -catalog ]; then CATALOG="-catalog $2"; shift; shift else CATALOG="" fi if [ $1 = -omdoc ]; then OMDOC="-omdoc $2"; shift; shift else OMDOC="" fi # "$@" expands to the list of command line parameters as a list of words # The working command should be exactly `find "$@"` FILES=`find "$@"` $BIN/check-some $CATALOG $OMDOC `echo $FILES`