; Detect Amiga OS 3.1.4 Extras
; ----------------------------
;
; Date: 2018-12-10
; Author: Henrik Noerfjand Stengaard
;
; AmigaDOS script to detect valid amiga os 3.1.4 extras floppy disk or adf file.


; end, if volume name is not "Extras3.1.4:"
IF NOT "`Which $amigaosdisk:`" EQ "Extras3.1.4:"
  SKIP notvalid
ENDIF

; end, if intellifont doesn't exist
IF NOT EXISTS "$amigaosdisk:System/Intellifont"
  SKIP notvalid
ENDIF 

; end, if cdfilesystem doesn't exist
IF NOT EXISTS "$amigaosdisk:L/CDFileSystem"
  SKIP notvalid
ENDIF

; end, if cdfilesystem is greater than v45.14
Version >NIL: "$amigaosdisk:L/CDFileSystem" 45 15 FILE
IF $RC EQ 0 VAL
  SKIP notvalid
ENDIF

; end, if cdfilesystem is less than v45.14
Version >NIL: "$amigaosdisk:L/CDFileSystem" 45 13 FILE
IF NOT $RC EQ 0 VAL
  SKIP notvalid
ENDIF

; end, if fastfilesystem doesn't exist
IF NOT EXISTS "$amigaosdisk:L/FastFileSystem"
  SKIP notvalid
ENDIF

; end, if fastfilesystem is greater than v46.13
Version >NIL: "$amigaosdisk:L/FastFileSystem" 46 14 FILE
IF $RC EQ 0 VAL
  SKIP notvalid
ENDIF

; end, if fastfilesystem is less than v46.13
Version >NIL: "$amigaosdisk:L/FastFileSystem" 46 12 FILE
IF NOT $RC EQ 0 VAL
  SKIP notvalid
ENDIF

SKIP end


; not valid
; ---------
LAB notvalid

echo "Amiga OS 3.1.4 Extras is not valid"


; end
; ---

LAB end
