;----------------------------------------------------------
; $VER: SDMountOnOff 1.3 (11/11/2017) APOLLO-Team
; 
; Semi-automatic mount/dismount for SAGA SD devices.
; 
; Requires 'FlushSD' from flype to be in your path (C:).
; Requires 'GiggleDisk' from Aminet to be in your path (C:).
; 
; http://aminet.net/disk/misc/giggledisk.lha
;----------------------------------------------------------

IF EXISTS T:SDMount
	
	;--------------------------------
	; DISMOUNT SDCard
	;--------------------------------
	
	Delete T:SDMount ALL FORCE QUIET
	
	IF EXISTS C:FlushSD
		C:FlushSD >NIL:
	ENDIF

ELSE

	;--------------------------------
	; MOUNT SDCard
	;--------------------------------

    MakeDir T:SDMount
    GiggleDisk DEVICE=sagasd.device UNIT=0 PREFIX=SD TO=T:SDMount
    Mount >NIL: T:SDMount/~(#?.info)

ENDIF
