##################################################################################################
#				Switch Configuration     U T I L I T Y
#
#						VER. 1.00
#
#		 				IDO BAR-TANA
# 		              COPYRIGHT (C) 1995. GNU Public License
# last updated: Jan 8, 1995
# 
# Support Files: part of KCU.
# Modified Files: Configure symbolic link in current directory.
# Documentation Files: KCU READMEs. 
#
# This is actually a snip from RUNME.Install. The very last dialog there is used to
# decide which configuration the user wants to use, and sets a symbolic link to that
# effect. That is all that is done in SwitchConfig.
# This is so KCU can live side by side with the old configure, as suggested
# by Linus Torvalds, "for those who need it..". 
##################################################################################################

#!/bin/sh
TEMP=./answer

if test -f ./Configure
then
	rm ./Configure
fi

dialog  --title "Switch Configurations" \
        --radiolist "\n Switch-Config will now make symbolic 
links according to your next choice:

Choose your configuration utility" 13 55 2 \
                1 "Kernel Configuration Utility" on \
                2 "Old Configure" off  2>$TEMP

if [ "$?" != "0" ] ; then return; fi

choice=`cat $TEMP`

for selection in $choice
do
case $selection in
        1) ln -sv ./Configure.kcu ./Configure >copyfile;;
        2) ln -sv ./Configure.old ./Configure >>copyfile;;
esac
done
CopyMessage=`cat copyfile`

dialog --title "Look What I've Done!" \
--msgbox "\n Switch-Config made the following symbolic 
 links in the current directory:\n
$CopyMessage
" 11 65

rm copyfile
