1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Added support for nested .nuxfs files.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2016-11-11 20:37:03 +01:00
parent 0a8f22df48
commit 37ae443e2c

View file

@ -25,7 +25,7 @@ function nuxfs.dsl.command {
nux.log debug Processing $CMD "$localFile" $@; 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; nux.log debug Working file: $NC_White$localFile;
if nuxfs.file.exists "$localFile"; then if nuxfs.file.exists "$localFile"; then
@ -61,7 +61,7 @@ function nuxfs.dsl.keywords {
#echo git clone $1 $2; #echo git clone $1 $2;
} }
directory.post() { directory.pre() {
nuxfs.dir.push "$1" nuxfs.dir.push "$1"
nux.log debug "Adding to dir stack: $1" nux.log debug "Adding to dir stack: $1"
} }
@ -69,6 +69,10 @@ function nuxfs.dsl.keywords {
directory.exists() { directory.exists() {
if test -d "$1"; then if test -d "$1"; then
nux.log debug "Directory exists '$1'" 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 else
nuxfs.error "$1" "is not directory." nuxfs.error "$1" "is not directory."
fi fi