#!/usr/bin/perl

my $target_disk		= $ARGV[2];

########################################################################################
# keep old stuff if it is there.
use File::Copy;
use File::Path;

my $pluginsettings = $target_disk . "/Library/Application Support/GarageBand/Instrument Library/Plug-in Settings/";

if (-d $pluginsettings . "fpuzhpxf") {
	# We know that the Electric Clav folder is the one we just installed,
	# so blow it away and move the old folder there.
	rmtree($pluginsettings . "Electric Clav");
	move($pluginsettings . "fpuzhpxf", $pluginsettings . "Electric Clav");	
}

#####################################################################
# now make sure to exit 0
exit 0;
