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
|
||||
# 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
|
||||
[ -d WEB-INF ] && src=. || src=
|
||||
|
@ -423,19 +426,26 @@ elif [ $# -eq 0 -a "$action" == config-template ]; then
|
|||
fi
|
||||
|
||||
srcs=()
|
||||
[ -n "$istmpdir" ] || ac_set_tmpdir tmpdir
|
||||
[ -n "$istmpdir" -o -z "$will_deploy" ] || ac_set_tmpdir tmpdir
|
||||
for src in "$@"; do
|
||||
if [ -f "$src" ] && is_archive "$src"; then
|
||||
setx waname=get_archive_appname "$src"
|
||||
wadir="$tmpdir/$waname"
|
||||
mkdir "$wadir"
|
||||
if extract_archive "$src" "$wadir"; then
|
||||
array_add srcs "$wadir"
|
||||
if [ -z "$will_deploy" ]; then
|
||||
setxx wadir=dirname -- "$src" // abspath
|
||||
array_add srcs "$wadir/$waname"
|
||||
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
|
||||
elif [ -d "$src" ]; then
|
||||
array_add srcs "$(abspath "$src")"
|
||||
elif [ -z "$will_deploy" ]; then
|
||||
array_add srcs "$(abspath "$src")"
|
||||
elif [ -e "$src" ]; then
|
||||
eerror "$src: fichier invalide"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue