.KEY SYS/K,QUIET/S
.BRA {
.KET }

; Install Patch Amiga OS 3.1.4.1
; ------------------------------
;
; Date: 2021-11-02
; Author: Henrik Noerfjand Stengaard
;
; AmigaDOS script to install patch Amiga OS 3.1.4.1 to Startup-Sequence.

IF "{SYS}" EQ ""
  set device "SYS"
ELSE
  set device "{SYS}"
ENDIF

; fail, if startup sequence doesn't exist
IF NOT EXISTS "$device:S/Startup-Sequence"
  echo "*e[1mError: Startup sequence doesn't exist!*e[0m"
  quit 20
ENDIF

; end, if patch amiga os 3.1.4.1 is already installed
search "$device:S/Startup-Sequence" "Patch-Amiga-OS-3141" >NIL:
IF $RC EQ 0 VAL
  IF "{QUIET}" EQ ""
    echo "Patch Amiga OS 3.1.4.1 is already installed!"
  ENDIF
  SKIP end
ENDIF

; fail, if patch amiga os 3.1.4.1 doesn't exist
IF NOT EXISTS "$device:S/Patch-Amiga-OS-3141"
  echo "*e[1mError: Patch Amiga OS 3.1.4.1 script doesn't exist!*e[0m"
  quit 20
ENDIF

; done
IF "{QUIET}" EQ ""
  echo "Patch Amiga OS 3.1.4.1 installed!"
ENDIF


; end
LAB end
