summaryrefslogtreecommitdiffstats
path: root/deployment/deploy-jar-sign.sh
blob: d6291c45c83a5c1c4ee8ea4c1a464f30de36f002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh

jarfile=$1
shift 

keystore=$1
shift 

storepass=$1
shift 

signarg=$1
shift 

if [ -z "$jarfile" -o -z "$keystore" -o -z "$storepass" ] ; then
    echo "usage $0 jarfile pkcs12-keystore storepass [signarg]"
    exit 1
fi

if [ ! -e $jarfile ] ; then
    echo $jarfile does not exist
    exit 1
fi

if [ ! -e $keystore ] ; then
    echo $keystore does not exist
    exit 1
fi

THISDIR=`pwd`

echo jarsigner -storetype pkcs12 -keystore $keystore $jarfile \"$signarg\"
jarsigner -storetype pkcs12 -keystore $THISDIR/$keystore -storepass $storepass $jarfile "$signarg"

cd $THISDIR