From ba09014710dea630d8c3fe07f74aabc2879df352 Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Mon, 12 Jun 2017 14:44:43 +0200 Subject: [PATCH] nux-runner Improved detection of direct invoke. Signed-off-by: Tony Tkacik --- bin/nux-runner | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/nux-runner b/bin/nux-runner index 20aeac5..1cc350a 100755 --- a/bin/nux-runner +++ b/bin/nux-runner @@ -16,23 +16,22 @@ readonly NUX_RUNNER=$NUX_RUNNER_BIN_DIR/nux-runner; nux.include nux-runner ## -## Commands provided by 'nux-runner': +## Commands provided by *nux-runner*: -## debug Runs specified task with debug messages enabled. +## debug Runs specified task with debug messages enabled. task.debug() { - N_LOG_debug=1 + nux.log.level debug nux-runner.run "$@" } -## trace Runs specified task with debug & trace enabled. +## trace Runs specified task with debug & trace enabled. task.trace() { - N_LOG_debug=1; - N_LOG_trace=2; + nux.log.level trace nux-runner.run "$@" } -## help Shows this help +## help Display this help task.help() { echo Usage: $NC_Bold$NUX_SCRIPTNAME ${NC_No}${NC_White}\${NC_No} [\] echo @@ -50,7 +49,7 @@ task.() { task.help } -if [ "$NUX_RUNNER" = "$0" ] +if [ "$NUX_RUNNER" = "$(realpath "$0")" ] then readonly NUX_SCRIPT=$1; shift;