; Detect Amiga OS 3.2 Extras
; --------------------------
;
; Date: 2021-07-25
; Author: Henrik Noerfjand Stengaard
;
; AmigaDOS script to detect valid amiga os 3.2 extras floppy disk or adf file.


; end, if volume name is not "Extras3.2:"
IF NOT "`Which $amigaosdisk:`" EQ "Extras3.2:"
  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 v47.26
Version >NIL: "$amigaosdisk:L/CDFileSystem" 47 27 FILE
IF $RC EQ 0 VAL
  SKIP notvalid
ENDIF

; end, if cdfilesystem is less than v47.26
Version >NIL: "$amigaosdisk:L/CDFileSystem" 47 25 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 v47.4
Version >NIL: "$amigaosdisk:L/FastFileSystem" 47 5 FILE
IF $RC EQ 0 VAL
  SKIP notvalid
ENDIF

; end, if fastfilesystem is less than v47.4
Version >NIL: "$amigaosdisk:L/FastFileSystem" 47 3 FILE
IF NOT $RC EQ 0 VAL
  SKIP notvalid
ENDIF

SKIP end


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

echo "Amiga OS 3.2 Extras is not valid"


; end
; ---

LAB end
