; Startup Sequence for HstWB Installer
; ------------------------------------
;
; Date: 2021-10-24
; Author: Henrik Noerfjand Stengaard
;
; AmigaDOS script for HstWB Installer install


; add alias
Alias cls "Echo NOLINE *"*E[0;0H*E[J*" "

echo "*e[1mHstWB Installer Commander Host*e[0m"

LAB nextcommand

; commands = list files sorted by name ascending
fsearch "SYS:Commands" >T:_commands1
frsort <T:_commands1 >T:_commands2

; get first command
set name `sed "1q;d" T:_commands2`
set command `sed "1q;d" <$name`

; wait 1 seconds, if no command
If "$command" EQ ""
  Wait SECS=1
  SKIP BACK nextcommand
EndIf

echo "$command >SYS:Output/$name.txt"
;set dummy `$command >SYS:Output/$name.txt`

SKIP BACK nextcommand
