summaryrefslogtreecommitdiffstats
path: root/deployment/funcs_jnlp_relocate.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-29 06:02:34 +0100
committerSven Gothel <[email protected]>2010-11-29 06:02:34 +0100
commit0fd8144f1e151b18bc9b45e130b5f923df8a1f05 (patch)
tree9ef72acbaafcbda2e6b430fddec8bf3c45560b92 /deployment/funcs_jnlp_relocate.sh
parentfa337a3723a2b376bdc7f74da5f5321eb8cb57f3 (diff)
Add JOCL; jogl-demos and jocl-demos reside in their own subfolder now
Diffstat (limited to 'deployment/funcs_jnlp_relocate.sh')
-rwxr-xr-xdeployment/funcs_jnlp_relocate.sh59
1 files changed, 57 insertions, 2 deletions
diff --git a/deployment/funcs_jnlp_relocate.sh b/deployment/funcs_jnlp_relocate.sh
index d529639..690078b 100755
--- a/deployment/funcs_jnlp_relocate.sh
+++ b/deployment/funcs_jnlp_relocate.sh
@@ -1,6 +1,6 @@
#! /bin/bash
-function copy_relocate_jnlps() {
+function copy_relocate_jnlps_base() {
url=$1
shift
@@ -38,12 +38,67 @@ for j in $jnlpdir/*.jnlp ; do
sed -e "s/JOGL_CODEBASE_TAG/$uri_esc/g" \
-e "s/GLUEGEN_CODEBASE_TAG/$uri_esc/g" \
-e "s/JOCL_CODEBASE_TAG/$uri_esc/g" \
- -e "s/DEMO_CODEBASE_TAG/$uri_esc/g" \
$j > $wsdir/$jb
done
}
+function copy_relocate_jnlps_demos() {
+
+url=$1
+shift
+
+wsdir=$1
+shift
+
+demos_rel=$1
+shift
+
+if [ -z "$url" -o -z "$wsdir" -o -z "$demos_rel" ] ; then
+ echo usage $0 codebase-url webstartdir demos_rel
+ echo Examples
+ echo sh $0 file:////usr/local/projects/JOGL/webstart ../../webstart demos
+ echo sh $0 http://domain.org/jogl/webstart /srv/www/webstart-next demos
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+demos=$wsdir/$demos_rel
+
+if [ ! -e $demos ] ; then
+ echo $demos does not exist
+ exit 1
+fi
+
+url_demos=$url/$demos_rel
+jnlpdir=$demos/jnlp-files
+
+if [ ! -e $jnlpdir ] ; then
+ echo $jnlpdir does not exist
+ exit 1
+fi
+
+cp -v $jnlpdir/*.html $demos
+
+uri_esc=`echo $url | sed 's/\//\\\\\//g'`
+uri_demos_esc=`echo $url_demos | sed 's/\//\\\\\//g'`
+for j in $jnlpdir/*.jnlp ; do
+ jb=`basename $j`
+ echo "processing $j to $demos/$jb"
+
+ sed -e "s/JOGL_CODEBASE_TAG/$uri_esc/g" \
+ -e "s/GLUEGEN_CODEBASE_TAG/$uri_esc/g" \
+ -e "s/JOCL_CODEBASE_TAG/$uri_esc/g" \
+ -e "s/DEMO_CODEBASE_TAG/$uri_demos_esc/g" \
+ $j > $demos/$jb
+done
+
+}
+
function remove_security_tag_jnlps() {
wsdir=$1