mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
nux-runner Improved detection of direct invoke.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
26893ea50f
commit
ba09014710
1 changed files with 7 additions and 8 deletions
|
|
@ -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}\<command\>${NC_No} [\<options\>]
|
||||
echo
|
||||
|
|
@ -50,7 +49,7 @@ task.() {
|
|||
task.help
|
||||
}
|
||||
|
||||
if [ "$NUX_RUNNER" = "$0" ]
|
||||
if [ "$NUX_RUNNER" = "$(realpath "$0")" ]
|
||||
then
|
||||
readonly NUX_SCRIPT=$1;
|
||||
shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue