diff --git a/support/build b/support/build index f7c28eb..4bda0bc 100755 --- a/support/build +++ b/support/build @@ -115,6 +115,7 @@ function build_images() { *) if [ -z "$sourced" ]; then source "$PROJDIR/$BUILDENV" + after_source_buildenv read -a HOST_MAPPINGS <<<"${HOST_MAPPINGS// / }" sourced=1 diff --git a/support/rundk.2postamble b/support/rundk.2postamble index 4e844a2..a2fb0e3 100644 --- a/support/rundk.2postamble +++ b/support/rundk.2postamble @@ -33,7 +33,9 @@ fi [ "$BUILDENV0" == none ] && BUILDENV0= [ "$BUILDENV" == none ] && BUILDENV= -NDIST="${DIST#d}" +function after_source_buildenv() { + NDIST="${DIST#d}" +} [ -n "$_sourced" ] && return 0 @@ -184,8 +186,10 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then if [ -z "$bootstrap" ]; then if [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then source "$PROJDIR/$BUILDENV" || exit 1 + after_source_buildenv elif [ -n "$BUILDENV0" -a -f "$PROJDIR/$BUILDENV0" ]; then source "$PROJDIR/$BUILDENV0" || exit 1 + after_source_buildenv fi if [ -z "$IMAGE" ]; then [ -n "$PRIVAREG" ] && IMAGE="$PRIVAREG/$IMAGENAME:$DIST" || IMAGE="$REGISTRY/$IMAGENAME:$DIST" @@ -273,6 +277,7 @@ OPTIONS [ "$Config" == none ] && Config= if [ -n "$Config" ]; then source "$Config" || exit 1 + after_source_buildenv fi [ -n "$Dist" ] && DIST="$Dist" if [ -z "$IMAGE" ]; then