; Secret installation -  Jürgen Einrauch 7.12.1997      
failat 21
setfont XCourier 13

echo "  *n*e[32m  ___________________________________________________*e[0m"
echo "  *e[43m                                                   *e[0m"
echo "  *e[28;43m       Fonts, libs and default installation        *e[0m"
echo "  *e[43m___________________________________________________*e[0m*n"

echo "   Secret benötigt XCourier.font 13 und hbasic2.library."
echo "*e[32m     Secret files need XCourier.font 13 and hbasic2.library.*e[0m"
echo "*n   Wollen Sie diese jetzt installieren ?"
echo "*e[32m     Would you install them now ?*e[0m"
echo noline "*n   (Ja/Nein or yes/no): "
set > nil: Inp ?
if $Inp eq "ja"
  skip start
endif
if $Inp eq "j"
  skip start
endif
if $Inp eq "y"
  skip start
endif
if $Inp eq "yes"
  skip start
endif
echo "*n   Installation abgebrochen."
echo "*e[32m     Installation aborted.*e[0m"
EndCLI >NIL:
quit

lab start

echo "*n   Installiere fonts, libs und default ......"
echo "*e[32m     Installing fonts, libs and default ......*e[0m*n"
WAIT 2 secs

IF EXISTS SYS:FONTS/XCourier/13
  Version >NIL: SYS:FONTS/XCourier/13
  IF WARN
  echo "      XCourier ist bereits vorhanden."
  echo "*e[32m        Xcourier still exists.*e[0m"
Endif
ELSE
  echo "      Installiere XCourier ......"
  echo "*e[32m      Installing XCourier ......*e[0m"
  Copy Fonts/XCourier SYS:FONTS/XCourier
Endif

IF EXISTS SYS:FONTS/XCourier.font
  Version >NIL: SYS:FONTS/XCourier.font
  IF WARN
  echo "      XCourier.font ist bereits vorhanden."
  echo "*e[32m        XCourier.font still exists.*e[0m"
Endif
ELSE
  echo "      Installiere XCourier.font ......."
  echo "*e[32m        Installing XCourier.font ......*e[0m"
  Copy Fonts/XCourier.font SYS:FONTS
Endif

IF EXISTS SYS:libs/hbasic2.library
  echo "      Library ist bereits vorhanden."
  echo "*e[32m        Library still exists.*e[0m"
ELSE
  echo "      Installiere Library ......"
  echo "*e[32m        Installing library ......*e[0m"
  Copy libs/hbasic2.library SYS:libs/hbasic2.library
Endif

IF EXISTS SYS:s/scr
  echo "      Secret ist bereits vorhanden."
  echo "*e[32m        Secret still exists.*e[0m"
ELSE
  echo "      Installiere default/scr ......"
  echo "*e[32m        Installing default/scr ......*e[0m"
  Copy default/scr SYS:s/scr
Endif

IF EXISTS SYS:s/scr.pw
  echo "      Paßwort für Secret ist bereits vorhanden."
  echo "*e[32m        Secret password still exists.*e[0m"
ELSE
  echo "      Installiere default/scr.pw ......"
  echo "*e[32m        Installing default/scr.pw ......*e[0m"
  Copy default/scr.pw SYS:s/scr.pw
Endif

wait 2 secs

echo "*n   Installation beendet."
echo "*e[32m     Installation finished.*e[0m"
wait 4 secs
