freebsd-ports/games/HeroesOfMightAndMagic/scripts/configure
Dmitry Sivachenko 2047f69074 New port: Heroes of Might and Magic III (Linux version).
PR:		25457
Submitted by:	Holger Lamm <holger@eit.uni-kl.de>
2001-03-07 11:35:58 +00:00

56 lines
1.5 KiB
Bash

#!/bin/sh
# Gently borrowed code from x11/XFree86-4
yesno () {
answ=X
while [ $answ = X ]; do
echo -n "$2 [$1] "
read answ
if [ X$answ = X ]; then answ=$1; fi
case $answ in
y|yes|Y|YES) answ=YES;;
n|no|N|NO) answ=NO;;
*) echo invalid answer
answ=X
;;
esac
done
}
question() {
echo -n "$2 [$1] "
read answ
if [ X$answ = X ]; then answ=$1; fi
}
F=$WRKDIR/.config
rm -f $F
cat <<EOF
Welcome to the Heroes of Might And Magic 3 installer.
You may now choose to install parts of the distribution on disk.
If you choose not to install a part, I will make a link to the CDROM
so you will have them in case you have your CD mounted while you play.
You must have your CDROM mounted right now.
EOF
question /cdrom "Where is your CD mounted?"
if [ ! -f $answ/Heroes_III_Tutorial.pdf ] ; then
echo "Might and Magic III CD not found. Please mount the CD and retry."
exit 1
fi
echo CD=$answ >> $F
echo "Do you want to install the Basis game packet?"
yesno YES "Without this you can't play without CD. (112 MB) "
echo BASIC=$answ >> $F
echo "Do you want to install the Graphic packet?"
yesno YES "Without this you can't play without CD. (14 MB) "
echo GRAPHIC=$answ >> $F
yesno YES "Do you want to install the Scenarios (1 MB) "
echo SCENARIO=$answ >> $F
yesno NO "Do you want to install Music (64 MB) "
echo MUSIC=$answ >> $F
yesno NO "Do you want to install Videos (137 MB) "
echo VIDEOS=$answ >> $F
exit 0