From 37ae443e2ca15d1dc0b2c6623b492a423418eb3a Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Fri, 11 Nov 2016 20:37:03 +0100 Subject: [PATCH] Added support for nested .nuxfs files. Signed-off-by: Tony Tkacik --- inc/nuxfs.dsl.inc.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/nuxfs.dsl.inc.sh b/inc/nuxfs.dsl.inc.sh index a05c807..33324f3 100644 --- a/inc/nuxfs.dsl.inc.sh +++ b/inc/nuxfs.dsl.inc.sh @@ -25,7 +25,7 @@ function nuxfs.dsl.command { nux.log debug Processing $CMD "$localFile" $@; - exec.if.function $CMD.pre "$localFile" "$@"; + exec.if.function $CMD.pre def.pre "$localFile" "$@"; nux.log debug Working file: $NC_White$localFile; if nuxfs.file.exists "$localFile"; then @@ -61,7 +61,7 @@ function nuxfs.dsl.keywords { #echo git clone $1 $2; } - directory.post() { + directory.pre() { nuxfs.dir.push "$1" nux.log debug "Adding to dir stack: $1" } @@ -69,6 +69,10 @@ function nuxfs.dsl.keywords { directory.exists() { if test -d "$1"; then nux.log debug "Directory exists '$1'" + nux.log trace "Trying to nest into directory" + if test -e "$1/.nuxfs"; then + source "$1/.nuxfs"; + fi; else nuxfs.error "$1" "is not directory." fi