summaryrefslogtreecommitdiffstats
path: root/hudson-builds/relocate-webstart-folder.sh
blob: d2a76ad3c00ef0ffaf0725580304a1814f990166 (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
48
49
50
#! /bin/bash

##
#
# Will relocate a webstart folder.
#   - copy wsdir1 -> wsdir2
#   - filters jnlp files (url)
#
# relocate-webstart-folder.sh <wsdir1> <wsdir2> <url>
# eg.
#   relocate-webstart-folder.sh /srv/www/deployment/webstart-b3 \
#                               /srv/www/deployment/webstart-next \
#                               http://lala.lu/webstart-next 
#
##

abuild=$1
shift

wsdir=$1
shift

url=$1
shift

if [ -z "$abuild" -o -z "$wsdir" -o -z "$url" ] ; then
    echo "usage $0 abuilddir webstartdir url"
    exit 1
fi

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

if [ -e $wsdir ] ; then
    echo $wsdir already exist
    exit 1
fi

sdir=`dirname $0`

. $sdir/../deployment/funcs_jnlp_relocate.sh

cp -a $abuild $wsdir

copy_relocate_jnlps_base $url $wsdir
copy_relocate_jnlps_demos $url $wsdir jogl-demos
copy_relocate_jnlps_demos $url $wsdir jocl-demos