1
1
Fork 0
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:
Tony Tkacik 2016-12-01 16:17:33 +01:00
parent 8aff47bd72
commit 1737416a72
2 changed files with 21 additions and 7 deletions

View file

@ -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