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


; end, if amiga os disk volume name is not "Extras3.1:"
IF NOT "`Which $amigaosdisk:`" EQ "Extras3.1:"
  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 v40.11
Version >NIL: "$amigaosdisk:L/CDFileSystem" 40 12 FILE
IF $RC EQ 0 VAL
  SKIP notvalid
ENDIF

; end, if cdfilesystem is less than v40.11
Version >NIL: "$amigaosdisk:L/CDFileSystem" 40 10 FILE
IF NOT $RC EQ 0 VAL
  SKIP notvalid
ENDIF

SKIP end


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

echo "Amiga OS 3.1 Extras is not valid"


; end
; ---

LAB end
