.K ""
echo "This script will unpack the following lharc archives:"
echo ""
echo "  OctaMED.lzh =>	OctaMED1.00b:"
echo ""

ask "Do you have a blank disk ready?"
if not WARN
	echo "Try again when you do ..."
	echo "All Done.  Click close gadget to get rid of window."
	endcli
endif

ask "Is floppy drive df1: free?"
if not WARN
	echo "You will need to do the unpacking yourself."
	echo "All Done.  Click close gadget to get rid of window."
	endcli
endif

echo "Formatting and unpacking disk ..."

sys:system/format drive df1: name OctaMED1.00b noicons
:c/lharc -x -a -m x OctaMED.lzh OctaMED1.00b:

echo "Installing custom bootblock on df1: ..."
BootBack BootBlock df1:

echo "Copying selected proprietary files from your sys: directory ..."

makedir OctaMED1.00b:devs/keymaps

if exists sys:c/Echo
	copy sys:c/Echo		OctaMED1.00b:c/Echo
endif

if exists sys:c/EndCLI
	copy sys:c/EndCLI	OctaMED1.00b:c/EndCLI
endif

if exists sys:c/EndIf
	copy sys:c/EndIf	OctaMED1.00b:c/EndIf
endif

if exists sys:c/FailAt
	copy sys:c/FailAt	OctaMED1.00b:c/FailAt
endif

if exists sys:c/IconX
	copy sys:c/IconX	OctaMED1.00b:c/IconX
endif

if exists sys:c/If
	copy sys:c/If		OctaMED1.00b:c/If
endif

if exists sys:c/LoadWB
	copy sys:c/LoadWB	OctaMED1.00b:c/LoadWB
endif

if exists sys:c/MakeDir
	copy sys:c/MakeDir	OctaMED1.00b:c/MakeDir
endif

if exists sys:c/Path
	copy sys:c/Path		OctaMED1.00b:c/Path
endif

if exists sys:c/Wait
	copy sys:c/Wait		OctaMED1.00b:c/Wait
endif


if exists sys:devs/parallel.device
	copy sys:devs/parallel.device	OctaMED1.00b:devs/parallel.device
endif

if exists sys:devs/printer.device
	copy sys:devs/printer.device	OctaMED1.00b:devs/printer.device
endif

if exists sys:devs/ramdrive.device
	copy sys:devs/ramdrive.device	OctaMED1.00b:devs/ramdrive.device
endif

if exists sys:devs/keymaps/usa1
	copy sys:devs/keymaps/usa1	OctaMED1.00b:devs/keymaps/usa1
endif


if exists sys:l/Aux-Handler
	copy sys:l/Aux-Handler	OctaMED1.00b:l/Aux-Handler
endif

if exists sys:l/Disk-Validator
	copy sys:l/Disk-Validator	OctaMED1.00b:l/Disk-Validator
endif

if exists sys:l/Port-Handler
	copy sys:l/Port-Handler	OctaMED1.00b:l/Port-Handler
endif

if exists sys:l/Ram-Handler
	copy sys:l/Ram-Handler	OctaMED1.00b:l/Ram-Handler
endif

if exists sys:libs/icon.library
	copy sys:libs/icon.library	OctaMED1.00b:libs/icon.library
endif

if exists sys:libs/diskfont.library
	copy sys:libs/diskfont.library	OctaMED1.00b:libs/diskfont.library
endif

echo "All Done.  Click close gadget to get rid of window."
endcli
