diff --git a/support/build b/support/build index a1073ce..1732dca 100755 --- a/support/build +++ b/support/build @@ -106,8 +106,8 @@ function build_images() { for image in "$@"; do case "$image" in rundk) + [ -n "$Config" ] && export RUNDK_FORCE_BUILDENV="$Config" local -a args=(--bootstrap) - [ -n "$Config" ] && args+=(--config "$Config") [ -z "$ForceBuild" ] && args+=(--unless-exists) [ -n "$Pull" ] && args+=(--pull) [ -n "$NoCache" ] && args+=(--no-cache) @@ -148,9 +148,14 @@ args=( ) parse_args "$@"; set -- "${args[@]}" -[ -n "$Config" ] && setx Config=abspath "$Config" - -build_check_env || die +if [ -n "$Config" ]; then + setx Config=abspath "$Config" + # pas de vérification d'environnement si on spécifie Config + # ne pas oublier d'implémenter un traitement spécifique si build_check_env() + # contient d'autres vérifications +else + build_check_env || die +fi [ "$action" == none ] && exit 0 case "$action" in diff --git a/support/rundk.2postamble b/support/rundk.2postamble index 4a2c960..7cf1ed0 100644 --- a/support/rundk.2postamble +++ b/support/rundk.2postamble @@ -185,7 +185,10 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then IMAGE= if [ -z "$bootstrap" ]; then - if [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then + if [ -n "$RUNDK_FORCE_BUILDENV" ]; then + source "$RUNDK_FORCE_BUILDENV" || exit 1 + after_source_buildenv + elif [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then source "$PROJDIR/$BUILDENV" || exit 1 after_source_buildenv elif [ -n "$BUILDENV0" -a -f "$PROJDIR/$BUILDENV0" ]; then @@ -215,7 +218,9 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args" Dist= - if [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then + if [ -n "$RUNDK_FORCE_BUILDENV" ]; then + Config="$RUNDK_FORCE_BUILDENV" + elif [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then Config="$PROJDIR/$BUILDENV" elif [ -n "$BUILDENV0" -a -f "$PROJDIR/$BUILDENV0" ]; then Config="$PROJDIR/$BUILDENV0"