From 0e5fb294f68ab2a1e78df45f948ff4214b8c3424 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 3 May 2017 18:57:38 +0200 Subject: [PATCH] Better argument parse for better help text. (And one clean line :) ) --- kiwix-build.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kiwix-build.py b/kiwix-build.py index 7f6bdb2..1ef4558 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -255,7 +255,7 @@ class BuildEnv: self.distname = 'debian' def setup_build(self, target_platform): - self.platform_info = platform_info = self.target_platforms[target_platform] + self.platform_info = self.target_platforms[target_platform] self.cross_config = self.platform_info.get_cross_config(self.distname) def setup_toolchains(self): @@ -915,7 +915,7 @@ class Builder: def parse_args(): parser = argparse.ArgumentParser() - parser.add_argument('targets', default='kiwix-tools', nargs='?', + parser.add_argument('targets', default='kiwix-tools', nargs='?', metavar='TARGET', choices=Dependency.all_deps.keys()) parser.add_argument('--working-dir', default=".") parser.add_argument('--libprefix', default=None) @@ -925,15 +925,15 @@ def parse_args(): " log files per commands")) parser.add_argument('--hide-progress', action='store_false', dest='show_progress', help="Hide intermediate progress information.") - parser.add_argument('--no-cert-check', action='store_true', - help="Skip SSL certificate verification during download") parser.add_argument('--skip-source-prepare', action='store_true', help="Skip the source download part") parser.add_argument('--build-deps-only', action='store_true', help=("Build only the dependencies of the specified targets.")) - parser.add_argument('--clean-at-end', action='store_true', - help="Clean all intermediate files after the (successfull) build") - + subgroup = parser.add_argument_group('advanced') + subgroup.add_argument('--no-cert-check', action='store_true', + help="Skip SSL certificate verification during download") + subgroup.add_argument('--clean-at-end', action='store_true', + help="Clean all intermediate files after the (successfull) build") subgroup = parser.add_argument_group('custom app', description="Android custom app specific options") subgroup.add_argument('--android-custom-app',