-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild-tools.sh
More file actions
executable file
·111 lines (93 loc) · 3.15 KB
/
Copy pathbuild-tools.sh
File metadata and controls
executable file
·111 lines (93 loc) · 3.15 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# This will build all the tools for the local environment and deploy them,
# You must have the QDL source checked out to $NCSA_DEV_INPUT/qdl
# If you have local installs of QDL and OA4MP, this will update them.
#
# The normal lifecycle is to invoke build.sh from this directory, then
# if you want the tools, invoke this. Nothing will run unless it
# detects various environment variables:
# Generally this should be run after building QDL, though a planned improvement
# is to have it with its own installer.
# QDL_HOME
# OA4MP_HOME
# Next, go to the QDL extensions in OA4MP and build them.
if [ -z ${NCSA_DEV_INPUT+x} ]; then
echo "no sources, skipping..."
exit 1
fi
if [ -z ${NCSA_DEV_OUTPUT+x} ]; then
echo "no output directory, skipping..."
exit 1
fi
OA4MP_ROOT=$NCSA_DEV_INPUT/oa4mp
OA4MP_SERVER_DEPLOY=$NCSA_DEV_OUTPUT/oa4mp
OA4MP_QDL_DEPLOY=$NCSA_DEV_OUTPUT/oa4mp-qdl
if [ ! -d "$OA4MP_QDL_DEPLOY" ]; then
mkdir "$OA4MP_QDL_DEPLOY"
# else
# echo " QDL deploy directory exists"
fi
# next line is so the profiles for the tools can be found in the source and built.
#cd $OA4MP_ROOT/qdl
#mvn -P qdl package
#mv target/oa2-qdl-jar-with-dependencies.jar target/qdl.jar
#cp target/qdl.jar $OA4MP_QDL_DEPLOY
# If the user has the sources to QDL, build the installer.
# /home/ncsa/dev/ncsa-git/qdl/language/src/main/scripts/create_installer.sh $OA4MP_ROOT/qdl $DEPLOY_ROOT/oa2-qdl oa2-qdl-installer.jar
#if [ -d "$NCSA_DEV_INPUT/qdl" ]; then
# $NCSA_DEV_INPUT/qdl/language/src/main/scripts/create_installer.sh $OA4MP_ROOT/qdl $OA4MP_QDL_DEPLOY oa2-qdl-installer.jar
#else
# echo "No QDL sources, creating OA4MP-QDL installer skipped."
#fi
# Update local QDL install with the latest and greatest
#
cd "$OA4MP_ROOT/qdl/src/main/scripts"
echo "building OA4MP QDL installer"
./create_installer.sh
if [[ $? -ne 0 ]] ; then
echo "create QDL installer failed"
exit 1
fi
echo " deploying OA4MP QDL installer"
if [ -z ${QDL_HOME+x} ]; then
echo "no QDL install, skipping..."
else
# If there is a local QDL install, update it.
java -jar "$OA4MP_QDL_DEPLOY/qdl-installer.jar" upgrade -dir $QDL_HOME -all;
fi
echo "building OLD OA4MP installer"
cd "$OA4MP_ROOT/server-admin/src/main/scripts/installer"
./create-installer.sh
if [[ $? -ne 0 ]] ; then
echo "create OA4MP installer failed"
exit 1
fi
echo " ... done!"
echo "building OA4MP Server installer"
cd "$OA4MP_ROOT/server-installer/src/main/scripts/"
./create-distro.sh
if [[ $? -ne 0 ]] ; then
echo "create OA4MP Server installer failed"
exit 1
fi
echo " ... done!"
echo "building OA4MP Client installer"
cd "$OA4MP_ROOT/client-installer/src/main/scripts/"
./create-distro.sh
if [[ $? -ne 0 ]] ; then
echo "create OA4MP Client installer failed"
exit 1
fi
echo " ... done!"
if [ -z ${OA4MP_HOME+x} ]; then
echo "no OA4MP local install, skipping..."
else
# OA4MP client and cli deploy to local system
cd $OA4MP_SERVER_DEPLOY
cp cli.jar $OA4MP_HOME/lib
cp clc.jar $OA4MP_HOME/lib
fi
echo "Building Pelican tar"
cd $OA4MP_ROOT/server-admin/src/main/resources/qdl
tar -czf pelican.gz pelican/
mv pelican.gz $OA4MP_SERVER_DEPLOY/pelican.gz
echo " ... done!"