:
#
# tapecustom
#
# Version 1.0 March 29, 1991
#
# (c) 1991, ALTOS COMPUTER SYSTEMS
# ALL RIGHTS RESERVED
#
# Purpose:
#         to extract ALTOS bundled products from tape
#
# Usage:
#         tapecustom [ tar_device [ tape_device ] ]
# where
#         tar_device  is the NO REWIND tape device to be used by tar
#                     (default: /dev/nrct0)
#         tape_device is the device to used by the tape rewind etc. command
#                     (default: the contents of /etc/default/tape)
#
TAPE_DEV=
TAR_DEV=/dev/nrct0
PREP_FILE="./tmp/altos/bundle.prep"
#
if [ x$1 != x ]
	then
		TAR_DEV=$1
		if [ x$2 != x ]
			then
				TAPE_DEV=$2
		fi
fi
#
# PREP_FILE is assumed to be in the third tar archive on the tape
#
cd /$CUSTOMROOT
echo "Please insert distribution tape (volume 1) in the drive"
echo "Hit enter to continue \c"
read x
tape rewind $TAPE_DEV
tape rfm $TAPE_DEV
tape rfm $TAPE_DEV
tar xf $TAR_DEV $PREP_FILE
tape rewind $TAPE_DEV
#
if [ -x  $PREP_FILE ]
	then
		sh -c "$PREP_FILE $TAR_DEV $TAPE_DEV"
		rm -f $PREP_FILE
		tape rewind $TAPE_DEV
		exit 0
	else
		echo $0: could not find $PREP_FILE
		tape rewind $TAPE_DEV
		exit 1
fi
