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

Compile builtin binaries in nux-env-dir/cache

This commit is contained in:
Tony Tkáčik 2023-08-31 09:32:08 +02:00
parent 229825c954
commit f7cc096d99
2 changed files with 9 additions and 4 deletions

View file

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

View file

@ -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() {