#! /bin/sh
# Termset -- allows retrieval of multiple Terminal config files.
# Please read the readme file in this distribution.
# Freeware. Bug reports to Scot Hacker, beos@birdhouse.org
# More BeOS shell scripts available at http://www.birdhouse.org/beos/software/


### Find out which settings files user has saved. Report back, get choice. ###
echo
echo Your saved configurations are:
echo
ls ~/config/settings/termset
echo
echo Which one would you like to use as your new Terminal settings?
echo \(Type name exactly as it appears above\)
read newsettings
echo You chose $newsettings

### Check to see if choice is valid. If not, quit ###

if [ -f ~/config/settings/termset/$newsettings ]; then
	echo Good. $newsettings exists.	
		else
	echo Ain\'t no such settings file as $newsettings. Later...
	exit
fi

### Look for existing Terminal.old. If it exists, delete it. ###
if [ -f ~/config/settings/Terminal.old ]; then
	rm ~/config/settings/Terminal.old
fi

### Rename Terminal to Terminal.old ###
mv ~/config/settings/Terminal ~/config/settings/Terminal.old

### Set chosen value as new Terminal settings. ###
cp ~/config/settings/termset/$newsettings ~/config/settings/Terminal

Terminal -t "$newsettings" &
