Echo "This script will install diskimage.device on your AROS system. Do you want to proceed?"
Ask "Answer (y/n):"
If NOT WARN
EndCLI
EndIf

Echo "Installing..."

Copy Devs/diskimage.device DEVS:

If EXISTS Devs/DiskImage
If NOT EXISTS DEVS:DiskImage
MakeDir DEVS:DiskImage
EndIf
Copy Devs/DiskImage/~(#?.#?) DEVS:DiskImage/
EndIf

If EXISTS Libs
Copy Libs/#?.library LIBS:
EndIf

Copy C/#? C:

Echo "Do you want to install example DOSDrivers in DEVS:DOSDrivers?"
Ask "Answer (y/n):"
If WARN
Copy Devs/DOSDrivers/~(#?.#?) DEVS:DOSDrivers/
Else
Echo "Do you want to install example DOSDrivers in SYS:Storage/DOSDrivers?"
Ask "Answer (y/n):"
If WARN
Copy Devs/DOSDrivers/~(#?.#?) SYS:Storage/DOSDrivers/
EndIf
EndIf

If EXISTS ENVARC:DiskImage
Delete ENVARC:DiskImage/~(#?.xml)
Else
MakeDir ENVARC:DiskImage
EndIf
Copy ENVARC/DiskImage/#?.xml ENVARC:DiskImage/ DONTOVR

If EXISTS DiskImageGUI
Echo "Do you want to install DiskImageGUI in SYS:System?"
Ask "Answer (y/n):"
If WARN
Copy DiskImageGUI DiskImageGUI.info SYS:System/
EndIf
EndIf

If EXISTS ENVARC:DiskImageGUI
Delete ENVARC:DiskImageGUI ALL
Endif

Echo "Diskimage.device has now been installed on your AROS system."
Ask "Press RETURN to close this window"
EndCLI
