summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_lib_00-init.sh
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2017-07-14 14:27:13 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-07-14 14:51:52 +0200
commitbc00f56353272ce1074c132e2a1e27fde9256fae (patch)
tree3fab50431e0f585ffb2e22a66466838ff71238d7 /scripts/lib/ptxd_lib_00-init.sh
parent90619df00d665b0ecd59b1a954c69c7726cffe88 (diff)
downloadptxdist-bc00f56353272ce1074c132e2a1e27fde9256fae.tar.gz
ptxdist-bc00f56353272ce1074c132e2a1e27fde9256fae.tar.xz
ptxdist: handle symlinks correctly when comparing PTXDIST_TOPDIR and PTXDIST_WORKSPACE
PTXDIST_TOPDIR is set to based on the path to ptxdist with all symlinks resolved. PTXDIST_WORKSPACE is set to the current working directory. If this path contains symlinks then comparing the strings does not work as expected. Use '-ef' instead to check if both paths point to the same directory. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_lib_00-init.sh')
-rw-r--r--scripts/lib/ptxd_lib_00-init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_lib_00-init.sh b/scripts/lib/ptxd_lib_00-init.sh
index 17ddae614..98a9261f8 100644
--- a/scripts/lib/ptxd_lib_00-init.sh
+++ b/scripts/lib/ptxd_lib_00-init.sh
@@ -51,7 +51,7 @@ ptxd_init_get_sysroot_base_platform() {
ptxd_init_ptxdist_path() {
if [ "${PTXDIST_WORKSPACE}" != "${PTXDIST_PLATFORMCONFIGDIR}" ]; then
PTXDIST_PATH="${PTXDIST_WORKSPACE}:${PTXDIST_PLATFORMCONFIGDIR}:${PTXDIST_TOPDIR}:"
- elif [ "${PTXDIST_WORKSPACE}" != "${PTXDIST_TOPDIR}" ]; then
+ elif [ ! "${PTXDIST_WORKSPACE}" -ef "${PTXDIST_TOPDIR}" ]; then
PTXDIST_PATH="${PTXDIST_WORKSPACE}:${PTXDIST_TOPDIR}:"
else
PTXDIST_PATH="${PTXDIST_WORKSPACE}:"