diff options
Diffstat (limited to 'src/main/swm/common/install.env')
-rw-r--r-- | src/main/swm/common/install.env | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/swm/common/install.env b/src/main/swm/common/install.env new file mode 100644 index 0000000..c98a29a --- /dev/null +++ b/src/main/swm/common/install.env @@ -0,0 +1,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 |