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>
This commit is contained in:
Edmund Wong
2016-12-14 12:59:23 +08:00
committed by Samuel Mehrbrodt
parent cd5b872632
commit 15aa0fbb70

View File

@@ -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'