#!/bin/sh
D1600=/dev/rmt8
D800=/dev/rmt0
DRIVE=$D1600
CREATE="Creating Stat Directory"
STORE='Storing Files on UNIX|STAT Tape'
LIST='Listing of UNIX|STAT Tape:'
if test $# = 0
then
	$0 store list
	exit 0
fi
for i
do
	case "$i" in
		clean)   /bin/rm -f src/*.o src/core src/a.out ;;
		list)    echo $LIST; tar tvfb $DRIVE 20 ;;
		extract) echo $CREATE; tar xfb $DRIVE 20 ;;
		800)     echo Using tape drive $D800; DRIVE=$D800 ;;
		1600)    echo Using tape drive $D1600; DRIVE=$D1600 ;;
		store)   echo $STORE; cd ..; tar cfb $DRIVE 20 stat ;;
		cpio-o)  echo $STORE; cd ..; find stat -print | cpio -oBc > $DRIVE ;;
		cpio-i)  echo $CREATE; cpio -iBcd < $DRIVE ;;
		*)       echo $0: Bad option -- $i; exit 1 ;;
	esac
done
exit 0
