From 6af03598c843876a35baab50e8a59f22fd5cb75d Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sun, 13 Jun 2021 12:06:59 +0400 Subject: [PATCH] =?UTF-8?q?pff:=20ajout=20de=20la=20commande=20normalis?= =?UTF-8?q?=C3=A9e=20new=5Fcmd=5Famue=5Fclean=5Flibs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pff | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/pff b/pff index ecb1195..0c7d2f3 100755 --- a/pff +++ b/pff @@ -618,12 +618,17 @@ function autoinit() { fi # Lancer les commandes AUTO_CMDS local cwd cmd - cwd="$(pwd)" - cd "$pffdir" - for cmd in "${AUTO_CMDS[@]}"; do - eval "$cmd" - done - cd "$cwd" + if [ ${#AUTO_CMDS[*]} -gt 0 ]; then + eetitle "AutoCmds" + cwd="$(pwd)" + cd "$pffdir" + for cmd in "${AUTO_CMDS[@]}"; do + estep "\$ $cmd" + eval "$cmd" + done + cd "$cwd" + eend + fi return 0 } @@ -854,6 +859,15 @@ function new__prepare_archive() { local "$destver"; upvar "$destver" "$version" } +function new_cmd_amue_clean_libs() { + # en mode distribution "patch", supprimer le contenu du répertoire + # WEB-INF/lib si ces fichiers sont relivrés + [ "$DISTTYPE" == patch ] || return + if [ -n "$(/bin/ls -d "$srcdir/WEB-INF/lib"/* 2>/dev/null)" ]; then + rm -f WEB-INF/lib/* + fi +} + function new_cmd() { local autopatch="$1" version="$2" disttype="$3" unwrap="$4" merge_strategy="$5" commit_policy="$6"; shift; shift; shift; shift; shift; shift local archive="$1" pffdir="$2" @@ -868,12 +882,17 @@ function new_cmd() { ## Lancer les commandes local cwd cmd - cwd="$(pwd)" - cd "$pffdir" - for cmd in "${NEW_CMDS[@]}"; do - eval "$cmd" - done - cd "$cwd" + if [ ${#NEW_CMDS[*]} -gt 0 ]; then + etitle "NewCmds" + cwd="$(pwd)" + cd "$pffdir" + for cmd in "${NEW_CMDS[@]}"; do + estep "\$ $cmd" + eval "$cmd" + done + cd "$cwd" + eend + fi ## lister les fichiers dans la source et la destination local workdir