#!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w
use strict;
use Coe;

my $PRGM="ProfileSelector";
my $VERSION="1.1.4.1";

if (@ARGV > 1) {
  &useage;
  exit -1;
}

sub useage {
  print "Useage: ProfileSelector [flags]\n";
}

my $ret=0;
my $arg1;

while (@ARGV>0) {
  $arg1=cleanString(shift, 4);
  if ("$arg1" eq "-h") {
     useage;
     exit 0;
  } elsif ("$arg1" eq "-H") {
     coeMan("COE_HOME/docs/man/$PRGM");
     exit 0;
  } elsif ("$arg1" eq "-V") {
     print "VERSION: $VERSION\n";
     exit 0;
  } else {
     coeMan("COE_HOME/docs/man/$PRGM");
     exit 0;
  }
}

$ret=coeRun("COE_COMP/JAVA2/bin/java",
	"-Dcfgfile=COE_HOME/lib/coeenv.txt",
	"-classpath",
	"COE_HOME/lib/opencoe.jar:COE_HOME/lib",
	"org.opencoe.coe.kernel.apps.ProfileSelector");

exit $ret;