[LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path

Petr Vorel
2020-12-17T12:15:20Z

that's not needed for build, but useful for debugging.

Running as ./parse.sh fails:
cat: ./../VERSION: No such file or directory

top_srcdir must be absolute path.

Fixes: a069cd36b ("docparse: Add test documentation parser")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
docparse/parse.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docparse/parse.sh b/docparse/parse.sh
index 172eab702..79011bc10 100755
--- a/docparse/parse.sh
+++ b/docparse/parse.sh
@@ -5,7 +5,7 @@
set -e

top_builddir=$PWD/..
-top_srcdir="$(dirname $0)/.."
+top_srcdir="$(cd $(dirname $0)/..; pwd)"

cd $top_srcdir

--
2.29.2