toinst: les options -r et -B ne requièrent pas que la webapp source existe
This commit is contained in:
parent
d4591dfe8e
commit
f9f0ffc4ab
24
toinst
24
toinst
|
@ -412,7 +412,10 @@ fi
|
||||||
# A partir de la liste des webapps et de WAMAPS, construire une liste de couples
|
# A partir de la liste des webapps et de WAMAPS, construire une liste de couples
|
||||||
# waname:src pour la sauvegarde et/ou le déploiement
|
# waname:src pour la sauvegarde et/ou le déploiement
|
||||||
|
|
||||||
[ -n "$fake" -o "$action" == config-template ] && will_deploy= || will_deploy=1
|
[ -n "$fake" \
|
||||||
|
-o "$action" == config-template \
|
||||||
|
-o "$action" == restart \
|
||||||
|
-o "$action" == backup ] && will_deploy= || will_deploy=1
|
||||||
|
|
||||||
if [ $# -eq 0 -a -n "$will_deploy" ]; then
|
if [ $# -eq 0 -a -n "$will_deploy" ]; then
|
||||||
[ -d WEB-INF ] && src=. || src=
|
[ -d WEB-INF ] && src=. || src=
|
||||||
|
@ -423,19 +426,26 @@ elif [ $# -eq 0 -a "$action" == config-template ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
srcs=()
|
srcs=()
|
||||||
[ -n "$istmpdir" ] || ac_set_tmpdir tmpdir
|
[ -n "$istmpdir" -o -z "$will_deploy" ] || ac_set_tmpdir tmpdir
|
||||||
for src in "$@"; do
|
for src in "$@"; do
|
||||||
if [ -f "$src" ] && is_archive "$src"; then
|
if [ -f "$src" ] && is_archive "$src"; then
|
||||||
setx waname=get_archive_appname "$src"
|
setx waname=get_archive_appname "$src"
|
||||||
wadir="$tmpdir/$waname"
|
if [ -z "$will_deploy" ]; then
|
||||||
mkdir "$wadir"
|
setxx wadir=dirname -- "$src" // abspath
|
||||||
if extract_archive "$src" "$wadir"; then
|
array_add srcs "$wadir/$waname"
|
||||||
array_add srcs "$wadir"
|
|
||||||
else
|
else
|
||||||
eerror "$src: erreur lors de l'extraction de l'archive"
|
wadir="$tmpdir/$waname"
|
||||||
|
mkdir "$wadir"
|
||||||
|
if extract_archive "$src" "$wadir"; then
|
||||||
|
array_add srcs "$wadir"
|
||||||
|
else
|
||||||
|
eerror "$src: erreur lors de l'extraction de l'archive"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ -d "$src" ]; then
|
elif [ -d "$src" ]; then
|
||||||
array_add srcs "$(abspath "$src")"
|
array_add srcs "$(abspath "$src")"
|
||||||
|
elif [ -z "$will_deploy" ]; then
|
||||||
|
array_add srcs "$(abspath "$src")"
|
||||||
elif [ -e "$src" ]; then
|
elif [ -e "$src" ]; then
|
||||||
eerror "$src: fichier invalide"
|
eerror "$src: fichier invalide"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue