[Libreoffice-commits] core.git: bin/gbuild-to-ide

Tor Lillqvist tml at collabora.com
Tue Nov 26 13:53:16 PST 2013


 bin/gbuild-to-ide |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit f804a2e8058ec82db91bf29eb0abd660cb08dc66
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Nov 26 23:50:12 2013 +0200

    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

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index f70c3f9..ac008c5 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()


More information about the Libreoffice-commits mailing list