summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-08-04 10:57:31 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-08-04 10:57:31 +0200
commit65fb90165a5e40965f3f672af20f58e4cb2900a8 (patch)
treecd8fc231bedb2936196fd185add453fc35c05cbd
parent031b7dec711fa43f5d94dde59960f4fe2ad7380c (diff)
downloadpodman-65fb90165a5e40965f3f672af20f58e4cb2900a8.tar.gz
podman-65fb90165a5e40965f3f672af20f58e4cb2900a8.tar.bz2
podman-65fb90165a5e40965f3f672af20f58e4cb2900a8.zip
hack/markdown-preprocess: allow to be executed from any dir
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
-rwxr-xr-xhack/markdown-preprocess5
1 files changed, 4 insertions, 1 deletions
diff --git a/hack/markdown-preprocess b/hack/markdown-preprocess
index 578615845..6d2675cc4 100755
--- a/hack/markdown-preprocess
+++ b/hack/markdown-preprocess
@@ -8,8 +8,11 @@ import os
import sys
def main():
+ script_dir = os.path.abspath(os.path.dirname(__file__))
+ man_dir = os.path.join(script_dir,"../docs/source/markdown")
+
try:
- os.chdir("docs/source/markdown")
+ os.chdir(man_dir)
except FileNotFoundError:
raise Exception("Please invoke me from the base repo dir")