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