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:
committed by
Samuel Mehrbrodt
parent
cd5b872632
commit
15aa0fbb70
@@ -1607,14 +1607,18 @@ SUBDIRS = %(subdirs)s
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def get_options():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='LibreOffice gbuild IDE project generator')
|
description='LibreOffice gbuild IDE project generator')
|
||||||
parser.add_argument('--ide', dest='ide', required=True,
|
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('--make', dest='makecmd', required=True,
|
parser.add_argument('--make', dest='makecmd', required=True,
|
||||||
help='the command to execute make')
|
help='the command to execute make')
|
||||||
args = parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
args = get_options()
|
||||||
# FIXME: Hack
|
# FIXME: Hack
|
||||||
if args.makecmd == 'make':
|
if args.makecmd == 'make':
|
||||||
args.makecmd = '/usr/bin/make'
|
args.makecmd = '/usr/bin/make'
|
||||||
|
Reference in New Issue
Block a user