From 144994fb1c9adb10bb6b0de854c1e4239350e80c Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 29 Sep 2018 21:03:24 +0800 Subject: [PATCH] Improve help messages --- ghcup.sh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/ghcup.sh b/ghcup.sh index 5734c11..451d6b5 100755 --- a/ghcup.sh +++ b/ghcup.sh @@ -15,7 +15,11 @@ INSTALL_BASE="$HOME/.ghcup" ## print help ## usage() { - (>&2 echo "${SCRIPT} [FLAGS] + (>&2 echo "ghcup ${VERSION} +GHC up toolchain installer + +USAGE: + ${SCRIPT} [FLAGS] FLAGS: -v, --verbose Enable verbose output @@ -31,7 +35,11 @@ SUBCOMMANDS: } install_usage() { - (>&2 echo "${SCRIPT} install [FLAGS] + (>&2 echo "ghcup-install +Install the specified GHC version + +USAGE: + ${SCRIPT} install [FLAGS] FLAGS: -h, --help Prints help information @@ -44,7 +52,11 @@ ARGS: } set_ghc_usage() { - (>&2 echo "${SCRIPT} set-ghc [FLAGS] + (>&2 echo "ghcup-set-ghc +Set the currently active GHC to the specified version + +USAGE: + ${SCRIPT} set-ghc [FLAGS] FLAGS: -h, --help Prints help information @@ -56,7 +68,11 @@ ARGS: } self_update_usage() { - (>&2 echo "${SCRIPT} self-update [FLAGS] [TARGET-LOCATION] + (>&2 echo "ghcup-self-update +Update the ghcup.sh script in-place + +USAGE: + ${SCRIPT} self-update [FLAGS] [TARGET-LOCATION] FLAGS: -h, --help Prints help information