summaryrefslogtreecommitdiffstats
path: root/deployment/funcs_jars_pack_sign.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-24 01:59:51 +0100
committerSven Gothel <[email protected]>2010-11-24 01:59:51 +0100
commita834a22b097edbb577f19c6a088c521809285c8a (patch)
tree9681b10583984c701dc6d8a872d34c04c0a15082 /deployment/funcs_jars_pack_sign.sh
parent60dabf98676b12f5158480346ccc9c1694010f5e (diff)
Fix promote-latest-builds ; Prep repack/sign/pack
Diffstat (limited to 'deployment/funcs_jars_pack_sign.sh')
-rwxr-xr-xdeployment/funcs_jars_pack_sign.sh125
1 files changed, 125 insertions, 0 deletions
diff --git a/deployment/funcs_jars_pack_sign.sh b/deployment/funcs_jars_pack_sign.sh
new file mode 100755
index 0000000..fbfd4fa
--- /dev/null
+++ b/deployment/funcs_jars_pack_sign.sh
@@ -0,0 +1,125 @@
+#! /bin/bash
+
+#
+# wsdir_jars_repack <wsdir>
+# wsdir_jars_pack200 <wsdir>
+# wsdir_jars_sign <wsdir> <pkcs12-keystore> <storepass> [signarg]
+#
+
+function wsdir_jars_repack() {
+
+wsdir=$1
+shift
+
+if [ -z "$wsdir" ] ; then
+ echo usage $0 webstartdir
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+THISDIR=`pwd`
+
+cd $wsdir
+
+rm -rf orig-jars
+mkdir -p orig-jars
+
+for i in *.jar ; do
+ cp -a $i orig-jars
+ echo pack200 --repack $i
+ pack200 --repack $i
+done
+
+cd $THISDIR
+
+}
+
+function wsdir_jars_pack200() {
+
+wsdir=$1
+shift
+
+if [ -z "$wsdir" ] ; then
+ echo usage $0 webstartdir
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+THISDIR=`pwd`
+
+cd $wsdir
+
+mkdir -p DLLS
+mv *natives*.jar DLLS/
+
+for i in *.jar ; do
+ echo pack200 -E9 $i.pack.gz $i
+ pack200 -E9 $i.pack.gz $i
+done
+
+mv DLLS/* .
+
+rm -rf DLLS
+
+cd $THISDIR
+
+}
+
+
+function wsdir_jars_sign() {
+
+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 jocl-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
+
+}
+