From 167d1a6f93493c169aa36d9c973542a954da16cc Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 25 Nov 2022 11:51:53 +0100 Subject: [PATCH] Ensure compiled scripts are updated if the scripts themselves are updated Signed-off-by: DL6ER --- build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.sh b/build.sh index e2fd1b56..169cbe04 100755 --- a/build.sh +++ b/build.sh @@ -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