;****************************
;----------------------------
; checks if given program is installed, if not abort install
; #program - to check

(procedure P_ChkRun
  (if
    (= 0 (run ("cd SYS:\nWhich %s" #program)))
    ("")
    (abort 
      (cat
	"You must install \"" #program "\" first!\n"
	"It must be accessible via the path.\n"
	"You can find it in the WHDLoad package."
      )
    )
  )
)

;****************************

(set #program "RawDIC")
(P_ChkRun)

    (set #CI_drive
      (askchoice
	(prompt "Select source drive for diskimages")
	(default 0)
	(choices "DF0:" "DF1:" "DF2:" "DF3:")
	(help @askchoice-help)
      )
    )
    (select #CI_drive
      (set #CI_drive "DF0:")
      (set #CI_drive "DF1:")
      (set #CI_drive "DF2:")
      (set #CI_drive "DF3:")
    )

;----------------------------

(run ("RawDIC SLAVE=SaveDisk.ISlave SOURCE=%s" #CI_drive))

;----------------------------

(exit)

