#!/bin/sh
# 
#---------------------------------------------------------------------------
# tbbs 1.2
# Copyright 1995, 				<runge@nina.boerde.de>
#---------------------------------------------------------------------------
# 
SEL=/tmp/tbbs.setup/s
TEMP=/tmp/tbbs.setup/config.answers

# check for intro0-path
if [ ! -d ../etc/intro.1 ]; then
 dialog --title "the intro-path ./etc/intro.1 is not avaible" --msgbox \
"you have execute the script from a invalid path - or: \n\
you have not execute this script from the 'tbbs.setup'-sript  " 10 40
 sleep 5
 exit
fi
rm -f ../etc/intro.1/*~
ls ../etc/intro.1/* 1> /dev/null 2> /dev/null

cat << EOF > $SEL
dialog --title "select from intro.1 - info-base" --menu " \
please select the file from the following list " 15 60 9 \\
EOF
for i in ../etc/intro.1/*; do
 echo "\"$i\" \"\" \\" >> $SEL
done
echo "2> $TEMP " >> $SEL


echo 'ERROR=$?' >> $SEL
echo 'if [ $ERROR = 1 -o $ERROR = 255 ]; then' >> $SEL
echo '  exit 1;' >> $SEL
echo 'fi' >> $SEL

sh $SEL

