#!c:\perl\bin\perl
# helper used to sign jar files
#
# specify a file to be signed otherwise, signs *
# to be used with Applets
#
# Nov/2004
# by Henry Chan

if ($#ARGV != -1)  {
    $signFile = $ARGV[0];
} else {
    $signFile = "*.jar";
}


for $i (`ls $signFile`) {
    chomp $i;
    print "signing $i\n";
    `jarsigner -signedjar sign.jar -storepass abc123  $i mykey`;
    `mv sign.jar $i`;
}
