summaryrefslogtreecommitdiffstats
path: root/src/main/swm/common/install.env
blob: c98a29a3f0c963f4def847869fb057b5e6115b5b (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
# This file is used to set the environment which the install_*.sh files
# will use when executing.  Only set variables that must be derived at
# installation time here.  For variables that should be set by the installer
# in SWM, add VariableDescriptor elements to the descriptor.xml.  Place
# logical steps in the install_preproc.sh or install_postproc.sh.

. `dirname $0`/common.env

# CHECK FOR ABSOLUTELY REQUIRED VARIABLES HERE
test -z "${SCLD_ENV}" && fail 1 "SCLD_ENV required"
test -z "${LATITUDE}" && fail 2 "LATITUDE required"
test -z "${LONGITUDE}" && fail 3 "LONGITUDE required"
test -z "${AFT_ENVIRONMENT}" && fail 4 "AFT_ENVIRONMENT required"

#derive version components for lrm.xml
MAJOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $1}'`; export MAJOR_VERSION
MINOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $2}'`; export MINOR_VERSION
PATCH_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $3}'`; export PATCH_VERSION

# special handling for introscope...
if [ ! -z "${INTROSCOPE_LIB}" ]; then
	if [ -z "${INTROSCOPE_AGENTPROFILE}" ]; then
	    fail 100 "INTROSCOPE_AGENTPROFILE must be set"
	fi
	
	if [ -f ${INTROSCOPE_LIB}/Agent.jar ] && [ -f ${INTROSCOPE_AGENTPROFILE} ]; then
		if [ -f ${TEMPLATE_RSRC_XML} ]; then
			INTROSCOPE_VARS="-javaagent:${INTROSCOPE_LIB}/Agent.jar -noverify -Dcom.wily.introscope.agentProfile=${INTROSCOPE_AGENTPROFILE} -Dintroscope.agent.agentName=${AFTSWM_ACTION_ARTIFACT_NAME}"
			export INTROSCOPE_VARS
		fi
	else
		INTROSCOPE_VARS=""; export INTROSCOPE_VARS
	fi
else
	INTROSCOPE_VARS=""; export INTROSCOPE_VARS
fi