
FailAt 21

Set DirName `CD`
Set ThemeName `PathPart FILE="$DirName"`

If NOT EXISTS "SYS:Prefs/Presets/$ThemeName"
  RequestChoice > NIL: "Theme not found" "You must first copy the *"$ThemeName*"*ndrawer to SYS:Prefs/Presets." "Ah, ok" TYPE=ERROR
Else
  Version > NIL: intuition.library VERSION 53
  If NOT WARN
    ; Copy settings supported by AmigaOS 4.1
    Copy QUIET Prefs/#?.prefs ENV:Sys/
  Else
    ; Copy AmigaOS 4.0-compatible settings only
    Copy QUIET Prefs/(gui|palette).prefs ENV:Sys/
  EndIf
EndIf

Unset ThemeName
Unset DirName
