diff --git a/support/rundk.2postamble b/support/rundk.2postamble index a2fb0e3..4a2c960 100644 --- a/support/rundk.2postamble +++ b/support/rundk.2postamble @@ -36,6 +36,7 @@ fi function after_source_buildenv() { NDIST="${DIST#d}" } +after_source_buildenv [ -n "$_sourced" ] && return 0 diff --git a/support/template.sh b/support/template.sh index 34771aa..c36b7b3 100755 --- a/support/template.sh +++ b/support/template.sh @@ -1,15 +1,15 @@ #!/bin/bash # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 # Modèle de script utilisant rundk pour lancer un traitement dans un container -# Ce script est à la racine du projet et rundk se trouve dans sbin/ -RUNDKDIR=sbin +# RUNDK est le chemin relatif vers rundk à partir du chemin du script +RUNDK=sbin/rundk MYDIR="$(dirname -- "$0")"; MYNAME="$(basename -- "$0")" if [ -z "$_RUNDK_IN_DOCKER" ]; then - "$MYDIR/$RUNDKDIR/rundk" --bs --ue --ci || exit 1 - exec "$MYDIR/$RUNDKDIR/rundk" "$0" "$@" + "$MYDIR/$RUNDK" --bs --ue --ci || exit 1 + exec "$MYDIR/$RUNDK" "$0" "$@" fi -source "$MYDIR/$RUNDKDIR/rundk" || exit 1 +source "$MYDIR/$RUNDK" || exit 1 source "$PROJDIR/$VENDORDIR/nulib/php/load.sh" || exit 1 args=(