From fd45e859aad9a4978afdff0478fc05d8290d75e7 Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 31 May 2015 20:50:08 -0300 Subject: Allow building docs from any directory Also just remove the .git check completely - just rely on make skipping it if it exists already. --- doc/user-guide/genhelp.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/user-guide/genhelp.py') diff --git a/doc/user-guide/genhelp.py b/doc/user-guide/genhelp.py index c43c8d23..b6a23c11 100644 --- a/doc/user-guide/genhelp.py +++ b/doc/user-guide/genhelp.py @@ -19,6 +19,7 @@ # Boston, MA 02110-1301, USA. +import os import re import sys import xml.etree.ElementTree as ET @@ -221,6 +222,9 @@ def main(): print("Usage: python genhelp.py input.xml output.txt") return + # ensure that we really are in the same directory as the input file + os.chdir(os.path.dirname(os.path.abspath(sys.argv[1]))) + txt = process_file(sys.argv[1]) open(sys.argv[2], "w").write(txt) -- cgit v1.2.3