diff options
author | Edmund Wong <ew@crazy-cat.org> | 2016-12-14 12:59:23 +0800 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-12-15 08:54:37 +0000 |
commit | 15aa0fbb706067d936edac7fdf64f60d07f95e6d (patch) | |
tree | 6b01ab18f0f20196bc2b3e9bc951e7579a4cf3aa /bin | |
parent | cd5b872632311b6c9fa6c5e89f23b8c5aedd62ca (diff) |
Move get options to a separate function.
Change-Id: I014f49b8239b0165ab696398b5ef0a2af5e0ae8c
Reviewed-on: https://gerrit.libreoffice.org/31990
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gbuild-to-ide | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 8ee2d134c9fd..e18f3bde51c6 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -1607,14 +1607,18 @@ SUBDIRS = %(subdirs)s """ -if __name__ == '__main__': +def get_options(): 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') parser.add_argument('--make', dest='makecmd', required=True, help='the command to execute make') - args = parser.parse_args() + return parser.parse_args() + + +if __name__ == '__main__': + args = get_options() # FIXME: Hack if args.makecmd == 'make': args.makecmd = '/usr/bin/make' |