#
#####Message Texts######
set mesg1 = "Restore: whole file system, specific dirs, or specific files:"
set mesg2 = "Mount necessary tape and strike <RET> when ready."
set mesg3 = "Enter names of directories to be recovered:"
set mesg4 = " Enter names of files to be recovered:"
set mesg5 = "is not a valid response;"
set mesg6 = "Please enter system, dirs, or files."
set mesgSp1 = "Please enter the pathname of the destination directory for this "
set mesgSp2 = "restoration(default is current directory):"
########################
					# prompt for range of restore
echo -n $mesg1' '
getwhat:
set what = ($<)
if ($#what == 0) then
	goto getwhat
endif
					# branch to set up proper restore comm.
switch ($what)
	case whole:
	case system:
					# ask where to restore to
		echo $mesgSp1
		echo -n $mesgSp2
		set dest_dir = ($<)
		if ($#dest_dir == 0) then
			set dest_dir = \.
		endif
					# change working dir as spec'd above
		cd $dest_dir
		pwd
					# request tapes prior to execute
		echo $mesg2
		set ready = ($<)
#		restore r
		breaksw
	case dirs:
					# ask for specifics
		echo $mesg3' '
		set names = ($<)
					# ask where to restore to
		echo $mesgSp1
		echo -n $mesgSp2
		set dest_dir = ($<)
		if ($#dest_dir == 0) then
			set dest_dir = \.
		endif
					# change working dir as spec'd above
		cd $dest_dir
		pwd
					# request tapes prior to execute
		echo $mesg2
		set ready = ($<)
#	restore x $names
		breaksw
	case specific:
	case files:
					# request tapes prior to execute
		echo $mesg4' '
		set names = ($<)
					# ask where to restore to
		echo $mesgSp1
		echo -n $mesgSp2
		set dest_dir = ($<)
		if ($#dest_dir == 0) then
			set dest_dir = \.
		endif
					# change working dir as spec'd above
		cd $dest_dir
		pwd
					# request tapes prior to execute
		echo $mesg2
		set ready = ($<)
#	restore xh $names
		breaksw
	default:
					# reject meaningless input
		echo -n $what $mesg5
		echo $mesg6' '
		goto getwhat
endsw
