:
#	streaming tape tar utility
#	copyright (c) 1987 by Bell Technologies
#

#ident	"@(#)star.sh	1.0"

DEV=${DEV:-/dev/tape}
OPT=$1; shift
PATH=/etc:$PATH

case $OPT in
	*b*f*)
		BVAL=$1
		DEV=$2
		shift; shift
		;;
	*f*)
		DEV=$1
		shift
		;;
	*)
		OPT=${OPT}f
esac
case $OPT in
	*c*)		# output
		tar $OPT $BVAL - $* | stream $SIZE - $DEV
		;;
	*x* | *t*)	#input
		stream $SIZE $DEV - | tar $OPT $BVAL - $*
esac
