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
|
|
@ -6,10 +6,13 @@
|
|||
### (similar in usage such as apt, git).
|
||||
###
|
||||
|
||||
readonly NUX_RUNNER=$0;
|
||||
|
||||
readonly NUX_RUNNER_BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
|
||||
source $NUX_RUNNER_BIN_DIR/../inc/nux-base.inc.sh
|
||||
|
||||
|
||||
readonly NUX_RUNNER=$NUX_RUNNER_BIN_DIR/nux-runner;
|
||||
|
||||
nux.include nux-runner
|
||||
|
||||
##
|
||||
|
|
@ -45,8 +48,16 @@ task.() {
|
|||
task.help
|
||||
}
|
||||
|
||||
readonly NUX_SCRIPT=$1;
|
||||
shift; # Determines script
|
||||
if [ "$NUX_RUNNER" = "$0" ]
|
||||
then
|
||||
readonly NUX_SCRIPT=$1;
|
||||
shift;
|
||||
else
|
||||
readonly NUX_SCRIPT=$0;
|
||||
readonly NUX_NO_INCLUDE="no include";
|
||||
fi
|
||||
|
||||
# Determines script
|
||||
readonly NUX_SCRIPTNAME=$(basename $NUX_SCRIPT)
|
||||
|
||||
nux-runner.run "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue