#!/h/COE/Comp/PERL5/bin/perl -T -I /h/COE/lib -w

use strict;
use Coe;

my $VERSION="1.1.4.1";

if (@ARGV != 2) {
        print "Usage: UAM_EditProfile.pl {profile name} {scope}\n";
        exit 1;
}

my $mode="--edit"; 
my $prof=cleanString(shift,1);
my $scope=cleanString(shift,1);

if ("$scope" eq "l" || "$scope" eq "local") {
        $scope="local";
} elsif ("$scope" eq "g" || "$scope" eq "global") {
        $scope="global";
} else {
        print "Usage: UAM_EditProfile.pl --edit {profile name} {scope}\n";
        exit 1;
}


coeRun("COE_COMP/JAVA2/bin/java", 
        "-Dcfgfile=COE_HOME/lib/coeenv.txt",
	"-classpath", 
	"COE_COMP/UAM/lib/UAM.jar:COE_HOME/lib/opencoe.jar", 
	"org.opencoe.coe.uam.UAM_EditProfile", 
	"$mode", "$prof", "$scope");