kas-container: Improve KAS_WORK/BUILD_DIR retrieval
Perform link resolution unconditionally to account for cases when the default paths are links. Use default values to simplify the assignments. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
03da3f9436
commit
3f98520ab6
@ -87,17 +87,8 @@ set_container_image_var() {
|
||||
KAS_CONTAINER_IMAGE="${KAS_CONTAINER_IMAGE_PATH}/${KAS_CONTAINER_IMAGE_NAME}:${KAS_IMAGE_VERSION}"
|
||||
}
|
||||
|
||||
if [ -n "${KAS_WORK_DIR}" ]; then
|
||||
KAS_WORK_DIR=$(readlink -f "${KAS_WORK_DIR}")
|
||||
else
|
||||
KAS_WORK_DIR="$(pwd)"
|
||||
fi
|
||||
|
||||
if [ -n "${KAS_BUILD_DIR}" ]; then
|
||||
KAS_BUILD_DIR=$(readlink -f "${KAS_BUILD_DIR}")
|
||||
else
|
||||
KAS_BUILD_DIR="${KAS_WORK_DIR}/build"
|
||||
fi
|
||||
KAS_WORK_DIR=$(readlink -f "${KAS_WORK_DIR:-$(pwd)}")
|
||||
KAS_BUILD_DIR=$(readlink -f "${KAS_BUILD_DIR:-${KAS_WORK_DIR}/build}")
|
||||
|
||||
KAS_CONTAINER_ENGINE="${KAS_CONTAINER_ENGINE:-${KAS_DOCKER_ENGINE}}"
|
||||
if [ -z "${KAS_CONTAINER_ENGINE}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user