mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
nux-runner: Added support ti be included as source.
Signed-off-by: Tony Tkacik <atkacik@brocade.com>
This commit is contained in:
parent
8aff47bd72
commit
1737416a72
2 changed files with 21 additions and 7 deletions
|
|
@ -2,13 +2,16 @@
|
|||
|
||||
nux-runner.run() {
|
||||
TASK=$1; shift; # Determines task
|
||||
if nux.check.function task.$TASK ; then
|
||||
if nux.check.function task.$TASK
|
||||
then
|
||||
nux.log debug "Running task: $TASK";
|
||||
task.$TASK "$@" # Runs task
|
||||
else
|
||||
nux.log debug "Including script: $NUX_SCRIPT"
|
||||
source $NUX_SCRIPT; # Includes script
|
||||
|
||||
if [ -z "$NUX_NO_INCLUDE" ]
|
||||
then
|
||||
nux.log debug "Including script: $NUX_SCRIPT"
|
||||
source $NUX_SCRIPT; # Includes script
|
||||
fi
|
||||
if nux.check.function task.$TASK ; then
|
||||
nux.log debug "Running task: $TASK";
|
||||
task.$TASK "$@" # Runs task
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue