Ensure compiled scripts are updated if the scripts themselves are updated

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2022-11-25 11:51:53 +01:00
parent 395e0792d8
commit 167d1a6f93
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,14 @@ if [[ -n "${clean}" ]]; then
fi
fi
# Remove compiled LUA scripts if older than the plain ones
for scriptname in src/lua/scripts/*.lua; do
if [ -f "${scriptname}.hex" ] && [ "${scriptname}.hex" -ot "${scriptname}" ]; then
echo "INFO: ${scriptname} is outdated and will be recompiled"
rm "${scriptname}.hex"
fi
done
# Configure build, pass CMake CACHE entries if present
# Wrap multiple options in "" as first argument to ./build.sh:
# ./build.sh "-DA=1 -DB=2" install