+# Launcher executable:
+available=
+for EXEC in ${EXECS[@]}; do
+ echo -n "Looking executable at '$EXEC' ... "
+ [ -x $EXEC ] && { available=yes ; echo "available !" ; break ; }
+ echo "not found"
+done
+[ -z "$available" ] && _exit "Anna Diameter Launcher (ADML) is not installed neither linked. See README.md (Install section)."
+
+# Dynamic library variant:
+dynlib_variant=
+[ -f ./release/example_diameter_launcher ] && dynlib_variant=release
+[ -f ./debug/example_diameter_launcher ] && dynlib_variant=debug
+[ -z "$dynlib_variant" ] && _exit "Unknown dynamic library variant"
+
+# Dictionary creation:
+available=
+for STACKMGMT_EXEC in ${STACKMGMT_EXECS[@]}; do
+ echo -n "Looking stack management executable at '$STACKMGMT_EXEC' ... "
+ [ -x $STACKMGMT_EXEC ] && { available=yes ; echo "available !" ; break ; }
+ echo "not found"
+done
+[ -z "$available" ] && _exit "Anna Diameter Stack Management Tool is not installed neither linked. See README.md (Install section)."
+STACKMGMT_EXEC=`readlink -f $STACKMGMT_EXEC`
+
+# Dynamic library:
+#available=
+#for DYNLIB in ${DYNLIBS[@]}; do
+# echo -n "Looking dynamic library at '$DYNLIB' ... "
+# [ -x $DYNLIB ] && { available=yes ; echo "available !" ; break ; }
+# echo "not found"
+#done
+#[ -z "$available" ] && _exit "Anna Diameter Launcher Dynamic Procedure Library (ADML) is not installed neither linked. See README.md (Install section)."
+
+[ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR)."
+
+echo
+if [ "$1" = "" ]
+then
+ echo
+ echo "Deploy one of these versions:"
+ echo
+ echo " (a)dvanced version: includes burst management script and templates for different scenarios. Automatic configuration during start."
+ echo " (b)asic version: 4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
+ echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs. Requires a server to perform the tests."
+ echo " (s)ystem test client: special client for stress testing. Requires a server/s to perform the tests."
+ echo
+ echo "Input option [b]:"
+ read option
+ [ "$option" = "" ] && option=b
+else
+ option=$1
+fi
+
+case $option in
+ a)
+ echo "Advanced deployment"
+ DEPLOYMENTS_DIR=deployments/advanced
+ DPATH_dflt=$HOME/ADML-advanced
+ ;;
+
+ b)
+ echo "Basic deployment"
+ DEPLOYMENTS_DIR=deployments/basic
+ DPATH_dflt=$HOME/ADML-basic
+ ;;
+
+ f)
+ echo "FT deployment"
+ DEPLOYMENTS_DIR=deployments/ft-client
+ DPATH_dflt=$HOME/ADML-ft-client
+ ;;
+
+ s)
+ echo "ST deployment"
+ DEPLOYMENTS_DIR=deployments/st-client
+ DPATH_dflt=$HOME/ADML-st-client
+ ;;
+
+ *)
+ _exit "Invalid deployment type '$option' !!"
+ ;;
+esac
+
+echo
+if [ "$2" = "" ]
+then
+ echo "Input deployment path [$DPATH_dflt]:"
+ read DPATH
+ [ "$DPATH" = "" ] && DPATH=$DPATH_dflt
+else
+ DPATH=$2
+fi
+
+[ -d $DPATH ] && _exit "The installation path '$DPATH' must not exists."
+EXE=`basename $DPATH`
+
+echo "Copying to '$DPATH' ..."