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:
parent
229825c954
commit
f7cc096d99
2 changed files with 9 additions and 4 deletions
|
|
@ -141,9 +141,14 @@ if [ -n "$NUX_SCRIPT" ]; then
|
||||||
nux.log debug "Including script: $NUX_SCRIPT"
|
nux.log debug "Including script: $NUX_SCRIPT"
|
||||||
nux.log trace "NUX_SCRIPT env: " $(set | grep NUX_SCRIPT)
|
nux.log trace "NUX_SCRIPT env: " $(set | grep NUX_SCRIPT)
|
||||||
|
|
||||||
|
compiledir=${TMPDIR:=/tmp}
|
||||||
compilefile=$(realpath "$NUX_SCRIPT" | md5sum | cut -d" " -f1)
|
compilefile=$(realpath "$NUX_SCRIPT" | md5sum | cut -d" " -f1)
|
||||||
#FIXME: check if nux_cache should be used.
|
#FIXME: If App in NUX-ENV, use global cache and not generated naming.
|
||||||
compilefile="$TMPDIR/$compilefile.nuxr.nuxsh"
|
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.log debug "Compiled script:" $compilefile
|
||||||
nux.nuxsh.use "$NUX_SCRIPT" "$compilefile";
|
nux.nuxsh.use "$NUX_SCRIPT" "$compilefile";
|
||||||
NUX_NO_INCLUDE="no-include"
|
NUX_NO_INCLUDE="no-include"
|
||||||
|
|
|
||||||
|
|
@ -175,8 +175,8 @@ nux.nuxsh.language.def() {
|
||||||
for arg in ${args//,/ }; do
|
for arg in ${args//,/ }; do
|
||||||
echo "${indent} local $arg="'"$1"'";shift;"
|
echo "${indent} local $arg="'"$1"'";shift;"
|
||||||
echo "${indent} nux.log trace ' ' arg $arg: "'$'$arg";"
|
echo "${indent} nux.log trace ' ' arg $arg: "'$'$arg";"
|
||||||
echo "${indent} nux.log trace ' ' rest: " '"$@";'
|
|
||||||
done
|
done
|
||||||
|
echo "${indent} nux.log trace ' ' additional args: " '"$@";'
|
||||||
}
|
}
|
||||||
|
|
||||||
.match.task_start.plan() {
|
.match.task_start.plan() {
|
||||||
|
|
@ -190,8 +190,8 @@ nux.nuxsh.language.def() {
|
||||||
for arg in ${args//,/ }; do
|
for arg in ${args//,/ }; do
|
||||||
echo "${indent} local $arg="'"$1"'";shift;"
|
echo "${indent} local $arg="'"$1"'";shift;"
|
||||||
echo "${indent} nux.log trace ' ' arg $arg: "'$'$arg";"
|
echo "${indent} nux.log trace ' ' arg $arg: "'$'$arg";"
|
||||||
echo "${indent} nux.log trace ' ' rest: " '"$@";'
|
|
||||||
done
|
done
|
||||||
|
echo "${indent} nux.log trace ' ' additional args: " '"$@";'
|
||||||
}
|
}
|
||||||
|
|
||||||
.block.start.plan() {
|
.block.start.plan() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue