summaryrefslogtreecommitdiff
path: root/bin/update_pch.sh
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-11-10 18:48:06 +0100
committerLuboš Luňák <l.lunak@collabora.com>2019-11-11 10:21:31 +0100
commitb1443d7b5d96c1bf56da31873b7bc0e585be2236 (patch)
treea705435edef25fc82740922086f40e6f9b538466 /bin/update_pch.sh
parentfea5c10e222b10d83e0081dc1d1b2e678689d250 (diff)
make bin/update_pch work with srcdir != builddir
I guess I'm tired of symlinking builddir/workdir to srcdir. Change-Id: I6192bb981d6727479cd2ce4b3ac75bb0a71c3fe9 Reviewed-on: https://gerrit.libreoffice.org/82397 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'bin/update_pch.sh')
-rwxr-xr-xbin/update_pch.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/update_pch.sh b/bin/update_pch.sh
index 5299242b9d7c..78b4a47e6044 100755
--- a/bin/update_pch.sh
+++ b/bin/update_pch.sh
@@ -11,8 +11,12 @@
# Usage: update_pch.sh [<module>]
# Invoke: make cmd cmd="./bin/update_pch.sh [..]"
-root=`dirname $0`
-root=`cd $root/.. >/dev/null && pwd`
+if test -n "$SRC_DIR"; then
+ root="$SRC_DIR"
+else
+ root=`dirname $0`
+ root=`cd $root/.. >/dev/null && pwd`
+fi
root=`readlink -f $root`
cd $root