;
; AmiTALK Installation Script $VER:AmiTALK V1.10 (28.11.94)
;

(set oldUserLevel (user 3))
(message
 "\nWelcome to the AmiTALK 1.10 installer script.\n\n"
 "Follow the installer script's instructions to install AmiTALK on your "
 "system."
)
(user oldUserLevel)

(copyfiles
 (prompt ("Copying talk to amitcp:bin"))
 (help @copyfiles-help)
 (source "talk")
 (dest "amitcp:bin")
 )

(copyfiles
 (prompt ("Copying talkd to amitcp:serv"))
 (help @copyfiles-help)
 (source "talkd")
 (dest "amitcp:serv")
 )

((select
  (askchoice
	(prompt "Which method of incoming notification would you like?")
	(choices "RexxReqTools" "KS 3.0+ notification")
	(help "For the RexxReqTools version, you must install RexxReqTools."
		  "The KS 3.0+ version requires Kickstart 3.0 or greater.")
	)
   (set @notify-choice "reqtools.talkrequest.rx")
   (set @notify-choice "30.talkrequest.rx")
   )
  
  (copyfiles
   (prompt ("Copying %s to amitcp:bin" @notify-choice))
   (help @copyfiles-help)
   (source @notify-choice)
   (dest "amitcp:bin")
   )
  
  (rename (tackon "amitcp:bin/" @notify-choice)
	(tackon "amitcp:bin/" "talkrequest.rx"))

  (delete (tackon "amitcp:bin/" @notify-choice))

  (run ("protect amitcp:bin/talkrequest.rx +s"))
)

(if
 (askbool
  (prompt "Would you like the proper line to be added to inetd.conf?")
	(help "For AmiTALK to work properly, a line must be added to amitcp:db/inetd.conf."
		"  If you have ever installed AmiTALK before, there is no need to repeat "
		"this step.  If this is your first time installing AmiTALK, please let "
		"the installer add this line.")
  (default 1)
  )
 (
  (rename "amitcp:db/inetd.conf" "amitcp:db/inetd.conf.backup")
  (run ("join amitcp:db/inetd.conf.backup inetd.addme to amitcp:db/inetd.conf"))
 )
 (
  (set @blah "blah")
 )
)


(set oldUserLevel (user 3))
(message
 ("\nAmiTALK is now installed.  Please reboot before attempting to use it.\n\nIf you have any questions, feel free to contact me via e-mail at:\n\ngunnbr@nextwork.rose-hulman.edu")
 )
(user oldUserLevel)

(exit (quiet))
