build_inf_centos.sh: use relative path for symlinks
Issue-ID: INF-274
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I5c4ac201bc334982ecd5e512f3b3862ca034ec6e
diff --git a/scripts/build_inf_centos/build_inf_centos.sh b/scripts/build_inf_centos/build_inf_centos.sh
index 989ee28..ddb29f3 100755
--- a/scripts/build_inf_centos/build_inf_centos.sh
+++ b/scripts/build_inf_centos/build_inf_centos.sh
@@ -127,8 +127,8 @@
mkdir -p ${STX_LOCAL_SRC_DIR} ${STX_LOCAL_PRJ_DIR} ${STX_MIRROR_DIR} ${STX_PRJ_OUTPUT}
rm -f ${STX_SRC_DIR} ${STX_PRJ_DIR}
- ln -sf ${STX_LOCAL_SRC_DIR} ${STX_SRC_DIR}
- ln -sf ${STX_LOCAL_PRJ_DIR} ${STX_PRJ_DIR}
+ ln -sf $(realpath --relative-to=${WORKSPACE} ${STX_LOCAL_SRC_DIR}) ${STX_SRC_DIR}
+ ln -sf $(realpath --relative-to=${WORKSPACE} ${STX_LOCAL_PRJ_DIR}) ${STX_PRJ_DIR}
echo_info "The following directories are created in your workspace(${WORKSPACE}):"
echo_info "For all layers source: ${STX_SRC_DIR}"