From a84775ce486b3653a9709c7a5ddef20fde8e55fc Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 19 Apr 2017 01:00:55 +0400 Subject: [PATCH] =?UTF-8?q?support=20des=20options=20--wamap=20et=20--prot?= =?UTF-8?q?ect=20depuis=20la=20configuration=20locale=20de=20d=C3=A9ploiem?= =?UTF-8?q?ent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtoinst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/rtoinst b/rtoinst index 1969527..904af38 100755 --- a/rtoinst +++ b/rtoinst @@ -142,16 +142,28 @@ if [ $# -eq 0 ] || [[ "$1" == -* ]]; then fi ## Hôtes sur lesquels faire le déploiement +toinst_options=() if array_isempty hosts && [ -n "$deploy_enable" ]; then urequire deploy deploy_setconf "$deploy_confname" if deploy_loadconf; then setxx webapp=abspath "$1" // basename -- - if eval "$(deploy_query -v host DEST webapp rtoinst_deploy "$deploy_profile" shell "$webapp")"; then - check_interaction -c && einfo "Cette webapp sera déployée vers les hôtes suivants: + if eval "$(deploy_query -v host,wamap,protect DEST webapp rtoinst_deploy "$deploy_profile" shell "$webapp")"; then + msg="Cette webapp sera déployée vers les hôtes suivants: $(array_to_lines host "" " ")" + if [ -n "$wamap" -o -n "$protect" ]; then + msg="$msg +avec le(s) paramètre(s) suivant(s):" + [ -n "$wamap" ] && msg="$msg + --wamap $(qval "$wamap")" + [ -n "$protect" ] && msg="$msg + --protect $(qval "$protect")" + fi + check_interaction -c && einfo "$msg" ask_any "Voulez-vous continuer?" Oq || die array_copy hosts host + [ -n "$wamap" ] && array_add toinst_options --wamap "$wamap" + [ -n "$protect" ] && array_add toinst_options --protect "$protect" fi fi fi @@ -218,7 +230,7 @@ rinteraction=$__interaction for host in "${hosts[@]}"; do if [ "$host" == "localhost" ]; then etitle -s "Déploiement sur l'hôte local" - "$archive" ${tmproot:+--tmproot "$tmproot"} -- "$@" + "$archive" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@" "${toinst_options[@]}" eend else splituserhost "$host" user host @@ -234,7 +246,7 @@ __estack=$(qval "$__estack") __tlevel=$(qval "$__tlevel") export __interaction __estack __tlevel ${UTOOLS_LANG:+UTOOLS_LANG='$UTOOLS_LANG'; export UTOOLS_LANG -}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@")" +}$(qvals "./$archivename" ${tmproot:+--tmproot "$tmproot"} -- "${webapps[@]}" "$@" "${toinst_options[@]}")" eend fi done