#!/bin/sh

# %Z%$RCSfile$ version $Revision: #8 $ created $Date: 2001/08/29 $
# %Z%%Q%
# Print the serial number if it exists or change the serial number

SERIAL_FILE=$SHOME/SERIAL

case $# in
	0)	# Print out the serial number if its file exists
		if [ -f "$SHOME/SERIAL" ]
		then
			cat "$SHOME/SERIAL"
		else
			echo "Error no file: $SHOME/SERIAL"
			echo "Enter the following to add a serial number."
			echo
			echo "Splus $RCSfile$"
			exit 1
		fi;;
	1)	# Set a new serial number.
		echo "Please enter the serial number on your tape:"
		read SERIAL_NUM
		echo $SERIAL_NUM > $SERIAL_FILE
		echo "Set the serial number to: $SERIAL_NUM" ;;
	*)	echo "Usage: Splus $RCSfile$ [set]"
esac
