From 15aa0fbb706067d936edac7fdf64f60d07f95e6d Mon Sep 17 00:00:00 2001 From: Edmund Wong Date: Wed, 14 Dec 2016 12:59:23 +0800 Subject: [PATCH] Move get options to a separate function. Change-Id: I014f49b8239b0165ab696398b5ef0a2af5e0ae8c Reviewed-on: https://gerrit.libreoffice.org/31990 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- bin/gbuild-to-ide | 8 ++++++-- 1 file 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'