Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/genassym.sh
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
while getopts "o:" option | while getopts "o:" option | ||||
do | do | ||||
case "$option" in | case "$option" in | ||||
o) outfile="$OPTARG" | o) outfile="$OPTARG" | ||||
use_outfile="yes";; | use_outfile="yes";; | ||||
*) usage;; | *) usage;; | ||||
esac | esac | ||||
done | done | ||||
shift $(($OPTIND - 1)) | shift $((OPTIND - 1)) | ||||
case $# in | case $# in | ||||
1) ;; | 1) ;; | ||||
*) usage;; | *) usage;; | ||||
esac | esac | ||||
if [ "$use_outfile" = "yes" ] | if [ "$use_outfile" = "yes" ] | ||||
then | then | ||||
work $1 3>"$outfile" >&3 3>&- | work "$1" 3>"$outfile" >&3 3>&- | ||||
else | else | ||||
work $1 | work "$1" | ||||
fi | fi | ||||