SCR_DIR=`readlink -f $0 | xargs dirname`
PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..)
+VARIANT=${1:-Release}
+
#############
# FUNCTIONS #
#############
echo " ADML with HTTP support installation "
echo "------------------------------------------------------"
echo
-[ -d $PROJECT_ROOT/build/Release ] && VARIANT=Release
-[ -d $PROJECT_ROOT/build/Debug ] && VARIANT=Debug
-[ -z "$VARIANT" ] && _exit "Cannot locate neither 'Release' nor 'Debug' variant !"
+[ ! -d $PROJECT_ROOT/build/${VARIANT} ] && _exit "Cannot locate neither '${VARIANT}' variant. Build the project !"
+echo "Variant: ${VARIANT}"
+echo
build_type_letter=$(echo $VARIANT | cut -c1 | tr '[:upper:]' '[:lower:]')
version__dflt=v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
mkdir -p ${ADML}/test-reports
# Scripts:
-cp ${PROJECT_ROOT}/example/diameter/launcher/resources/scripts/operation_curl.sh ${ADML}/operation.sh
+cp ${PROJECT_ROOT}/example/diameter/launcher/resources/scripts/operation.sh ${ADML}
# Templates:
mkdir $DTDs
cd - >/dev/null
# ADML Agent shall use http server:
-httpOpt="--httpServer \`grep -v ^# .httpServer\`"
+httpOpt="--httpServerShared --httpServer \`grep -v ^# .httpServer\`"
echo "${httpOpt}" >> ${ADML}/args.ft
echo "${httpOpt}" >> ${ADML}/args.st
echo "localhost:8000" > ${ADML}/.httpServer
# Help
cp ${PROJECT_ROOT}/example/diameter/launcher/resources/HELP.md ${ADML}
+# Simple services which only loads the diameter base dictionary:
+cat << EOF > ${ADML}/services.xml
+<services>
+ <stack id="0" dictionary="stacks/diameter_base.0.xml" fixMode="Never"/>
+</services>
+EOF
+
# Remove AOTS actions:
rm ${ADML}/ACTIONS.md