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

nux.dsl: Added debug logging for regeneration.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2019-03-24 17:20:19 +01:00
parent 67ea2735e6
commit 918df06d43

View file

@ -99,11 +99,11 @@ nux.dsl.plan() {
local file="$2"; local file="$2";
local cached="${3:-$file${NUDSL_CACHE_SUFFIX}}"; local cached="${3:-$file${NUDSL_CACHE_SUFFIX}}";
if [ "$file" -ot "$cached" ]; then if [ "$file" -ot "$cached" ]; then
nux.log debug No need to recompile. nux.log debug "$file: No need to recompile."
return; return;
fi fi
nux.log debug Needs regeneration, creating new version. nux.log debug "$file: Needs recompilation - creating new version."
local dirname=$(dirname "$cached") local dirname=$(dirname "$cached")
mkdir -p "$dirname"; mkdir -p "$dirname";
@ -111,7 +111,7 @@ nux.dsl.plan() {
if (nux.dsl.process plan "$language" "$file" > "$execution_plan") ; then if (nux.dsl.process plan "$language" "$file" > "$execution_plan") ; then
mv -f "$execution_plan" "$cached"; mv -f "$execution_plan" "$cached";
else else
echo "Plan could not be generated. See errors." nux.log error "$file: Plan could not be generated. See errors."
rm "$execution_plan" rm "$execution_plan"
return -1; return -1;
fi fi