: 10/6/83	waf		Use 'spar' instead of 'tar'.
: 10/19/83	waf		TAR = tar/spar.
: 11/15/83	waf		Del file list. Change file list filenames.
: 12/15/83	waf		Added release type chk. Turned out not to be necassary.

echo "}} Make BBasic release floppy.
"
echo '** Before making a release -
> Set sticky bit in /bb/bb, /bb/bbdeb, /bb/bbcomp.
> Change access privileges of pmach.
> /bb/run/test should include all test pgms.
> Make bbdeb (to recognize new rev).
'


: Get release type.
NORMREL=0
INTREL=1
echo
echo "} Enter" $NORMREL "for normal release floppy."
echo "       " $INTREL "for internal release floppy."
read RELTYPE
if test $RELTYPE -eq $NORMREL
then
	echo "Normal Release."
elif test $RELTYPE -eq $INTREL
then
	echo "Internal Release."
else
	echo "** Bad Response **"
	exit
fi
echo

if test 1 -eq 0
then
	echo "} Use 'tar' or 'spar' ?"
	read TAR
else
	TAR=tar
fi
if test $TAR = "spar"
then
	sparset
fi
echo "}  Using" $TAR "floppy utility."
echo 

echo "} Make file log listing {y}"
read ENTRY
if test "$ENTRY" != "n"
then
	rm rellist.tx
	for i in 1 2 3 4
	do
		echo } adding rellist$i to file list
		ls -C `cat rellist$i` >>rellist.tx
	done
	echo "} printing file list"
	lpr -r rellist.tx &
fi

echo
beep
echo Put first disk in drive - press newline when ready
read IN

echo "} writing rellist1"
$TAR cvl `cat rellist1`

echo
beep
echo Put second disk in drive - press newline when ready
read IN

echo "} writing rellist2"
$TAR cvl `cat rellist2`
echo "} writing rellist3"
$TAR rvl `cat rellist3`
echo "} writing rellist4"
$TAR rvl `cat rellist4`

beep
echo "* done *"


echo "
After makeing a release -
} rm all *.OLD & *.bu files in /bb/run/src.
} rm all files in /bb/run/test.
} append /bb/run/devsrc/revlog to /bb/notes/revlog.
"

if test 1 -eq 0
then
echo "Remove all files in /bb/run/test?"
read ENTRY
if test $ENTRY = 'y'
then
	echo "Doing it"
	rm /bb/run/test/*
fi

echo "Remove all .OLD & .bu files in /bb/run/src?"
read ENTRY
if test $ENTRY = 'y'
then
	echo "Doing it"
	rm /bb/run/src/*.OLD* /bb/run/src/*.bu*
fi

echo "Append revlog to /bb/notes/revlog?"
read ENTRY
if test $ENTRY = 'y'
then
	echo "Doing it"
	cat /bb/run/devsrc/revlog >>/bb/notes/revlog
	rm /bb/run/devsrc/revlog
	echo "/bb/run/devsrc/revlog deleted"
fi
fi
