summaryrefslogtreecommitdiffstats
path: root/bin
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 /bin
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 'bin')
-rwxr-xr-xbin/ptxdist2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 85c5a0197..6e04a7b96 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1222,7 +1222,7 @@ create_docs() {
builder="${1}"
outdir=${PTXDIST_WORKSPACE}/Documentation
- if [ "${PTXDIST_TOPDIR}" = "${PTXDIST_WORKSPACE}" ]; then
+ if [ "${PTXDIST_TOPDIR}" -ef "${PTXDIST_WORKSPACE}" ]; then
srcdir="${PTXDIST_TEMPDIR}/docs"
else
srcdir="${STATEDIR}/docs"