From 79f58c69618d825020748bbb0a50dd9d11252e90 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 8 Aug 2017 01:02:17 +0200 Subject: [PATCH] build - bit more output of 'usage()' - option '--debug' added to sub-command 'install' --- build | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build b/build index c5b1357..b903565 100755 --- a/build +++ b/build @@ -13,8 +13,10 @@ declare -r BOOTSTRAP_DIR=$(std::get_abspath "${BOOTSTRAP_DIR}") declare -r SRC_DIR="${BOOTSTRAP_DIR}/Pmodules" usage() { - echo "build [OPTIONS] SUB-COMMAND" - std:die 1 "" + echo " +build [OPTIONS] configure|compile|install +" + std::die 1 "" } declare -rx DEFAULT_PMODULES_ROOT='/opt/psi' @@ -167,6 +169,9 @@ pmodules::install() { while (( $# > 0 )); do case $1 in + --debug ) + set -x + ;; --config ) config_file="$2" shift 1 @@ -311,7 +316,7 @@ while (( $# > 0 )); do shift 1 done -[[ -n "${subcmd}" ]] || std::die 1 "Missing sub-command." +[[ -n "${subcmd}" ]] || std::die 1 "Missing sub-command.\n\nUse 'build --help' to get some help..." pmodules::${subcmd} "${subcmd_args[@]}"