aboutsummaryrefslogtreecommitdiffstats
path: root/make/scripts/deploy-jars-sign.sh
blob: 1a4421aa9b5af39caefc789b750d5dbaaf9c1ad7 (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
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh

wsdir=$1
shift 

keystore=$1
shift 

storepass=$1
shift 

signarg=$1
shift 

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

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

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

THISDIR=`pwd`

cd $wsdir

rm -rf demo-jars
mkdir -p demo-jars
mv jogl.test.jar jogl-demos*jar demo-jars/

for i in *.jar ; do
    echo jarsigner -storetype pkcs12 -keystore $keystore $i \"$signarg\"
    jarsigner -storetype pkcs12 -keystore $THISDIR/$keystore -storepass $storepass $i "$signarg"
done

mv demo-jars/* .
rm -rf demo-jars

cd $THISDIR