diff --git a/bin/nuxr-nuxsh b/bin/nuxr-nuxsh index e3dc22d..d617d01 100755 --- a/bin/nuxr-nuxsh +++ b/bin/nuxr-nuxsh @@ -141,9 +141,14 @@ if [ -n "$NUX_SCRIPT" ]; then nux.log debug "Including script: $NUX_SCRIPT" nux.log trace "NUX_SCRIPT env: " $(set | grep NUX_SCRIPT) + compiledir=${TMPDIR:=/tmp} compilefile=$(realpath "$NUX_SCRIPT" | md5sum | cut -d" " -f1) - #FIXME: check if nux_cache should be used. - compilefile="$TMPDIR/$compilefile.nuxr.nuxsh" + #FIXME: If App in NUX-ENV, use global cache and not generated naming. + if [ "$NUX_ENV_DIR" = "$NUXR_APP_DIR" ]; then + compiledir="$NUX_CACHE_DIR/bin" + compilefile="$NUXR_APP_NAME" + fi + compilefile="$compiledir/$compilefile.nuxr.nuxsh" nux.log debug "Compiled script:" $compilefile nux.nuxsh.use "$NUX_SCRIPT" "$compilefile"; NUX_NO_INCLUDE="no-include" diff --git a/inc/nux/nuxsh.inc.sh b/inc/nux/nuxsh.inc.sh index 23f5a6c..239b814 100644 --- a/inc/nux/nuxsh.inc.sh +++ b/inc/nux/nuxsh.inc.sh @@ -175,8 +175,8 @@ nux.nuxsh.language.def() { for arg in ${args//,/ }; do echo "${indent} local $arg="'"$1"'";shift;" echo "${indent} nux.log trace ' ' arg $arg: "'$'$arg";" - echo "${indent} nux.log trace ' ' rest: " '"$@";' done + echo "${indent} nux.log trace ' ' additional args: " '"$@";' } .match.task_start.plan() { @@ -190,8 +190,8 @@ nux.nuxsh.language.def() { for arg in ${args//,/ }; do echo "${indent} local $arg="'"$1"'";shift;" echo "${indent} nux.log trace ' ' arg $arg: "'$'$arg";" - echo "${indent} nux.log trace ' ' rest: " '"$@";' done + echo "${indent} nux.log trace ' ' additional args: " '"$@";' } .block.start.plan() {