#sccs	"@(#)flopsys/lbin:mkinstall	1.1"

#
#  mkinstall  -  Generate install set of floppies for S4 installation
#
#  Usage:  mkinstall <APP>
#
#	Where <APP> is the code for the application
#
#	The set must already be assembled in directory /usr/install/<APP>,
#	via the mkinsdir program.
#

if [ \! $1 ]
then
	echo "Usage:  mkinstall <Application name>"
	exit 1
fi

DIR=/ROOT/usr/install/$1

if [ \! -d $DIR ]
then
	echo "Installation set $1 not found"
	exit 1
fi

cd $DIR

echo "CREATING Size File\n"
echo Size > /tmp/list$$
ls | grep -v "^Size$" >> /tmp/list$$
find . -print | cpio -ocB > /dev/null 2>/tmp/Size$$
set `cat /tmp/Size$$`
echo $1 > Size

echo "CREATING \c"
cat $DIR/Name
echo "\tInsert first disk of set and type RETURN \c"
read line

cat /tmp/list$$ | cpio -ocB > /dev/rfp021

rm -f /tmp/list$$ /tmp/Size$$
