diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-11-26 23:50:12 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-11-26 23:50:12 +0200 |
commit | f804a2e8058ec82db91bf29eb0abd660cb08dc66 (patch) | |
tree | 6efaf8ba45d955f4d9785f0d8b2eee87db9f3f53 /bin | |
parent | acca36bbbc7924988e003d492918c61e365fd933 (diff) |
Make it easier to debug the gbuild-to-ide script
Add an --input option so that the input doesn't have to be generated each
time but can (manually) be stored in a file and that then given to the script
when debugging it interactively.
Change-Id: Icdb6abc828c6d16e29a99494d00eb0c8435f2826
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gbuild-to-ide | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index f70c3f9649c0..ac008c5bd583 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -281,10 +281,15 @@ if __name__ == '__main__': parser = argparse.ArgumentParser( description='LibreOffice gbuild IDE project generator') parser.add_argument('--ide', dest='ide', required=True, - help='the ide to generate project files for') + help='the IDE to generate project files for') + parser.add_argument('--input', dest='input', required=False, + help='the input file, not normally used, for debugging this script') args = parser.parse_args() paths = {} - gbuildparser = GbuildParser().parse(sys.stdin) + if args.input: + gbuildparser = GbuildParser().parse(open(args.input, 'r')) + else: + gbuildparser = GbuildParser().parse(sys.stdin) #DebugIntegrationGenerator(gbuildparser).emit() if args.ide == 'kdevelop': KdevelopIntegrationGenerator(gbuildparser).emit() |