From 6db6d356232a4ba84984b78582851e979a989ff9 Mon Sep 17 00:00:00 2001 From: Hans Fangohr <hans.fangohr@mpsd.mpg.de> Date: Thu, 25 May 2023 18:26:00 +0200 Subject: [PATCH] special help string for 'install' Only 'install' needs to know about --ALL, etc. --- mpsd-software-environment.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mpsd-software-environment.py b/mpsd-software-environment.py index da80bdc..86baa2b 100755 --- a/mpsd-software-environment.py +++ b/mpsd-software-environment.py @@ -383,6 +383,16 @@ def main(): "release", type=str, help="Release version to install or remove" ) if cmd in ["install", "reinstall"]: + # "install" command needs additional documentation + if cmd == "install": + help_part2 = ( + "Use '--toolchains ALL' to " + "install all toolchains. If '--toolchain' is not " + "specified, list available toolchains for the release " + "(after environment has been prepared if not done yet)." + ) + else: + help_part2 = "" subp.add_argument( "--toolchains", # first option defines attribute # name `args.toolchains` in `args = parser_args()` @@ -392,12 +402,7 @@ def main(): dest="toolchains", nargs="+", default="NONE", - help=( - "List of toolchains to install (use '--toolchains ALL' to " - "install all toolchains). If nothing is specified, list of" - "available toolchains for the release would be shown after" - "creating the environment." - ), + help=f"List of toolchains to {cmd}. " + help_part2, ) subp.add_argument( "--enable-build-cache", -- GitLab