From 7c29dd07da485fbaa9373ea295c2d0b51b1bfa59 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sat, 21 Sep 2024 18:50:39 +0200 Subject: [PATCH] run.sh: Fix rebuilding C modules on every run --- run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 0a4ed7f8..1b4a3b2c 100755 --- a/run.sh +++ b/run.sh @@ -84,7 +84,8 @@ cd "$(dirname "$0")" # Check if c modules are compiled and actual for cmod in "${C_MODULES[@]}"; do - expected_version=\$C_VERSION_${cmod} + expected_version_str="C_VERSION_${cmod}" + expected_version=$(eval echo "\$${expected_version_str}") if ! reported_version=$(PYTHONPATH="." python3 -c 'import os, ctypes; lib=ctypes.CDLL("./'lib${cmod}'.so"); print(lib.'${cmod}'_module_version())'); then echo -e "${Purple}Failed to check module version for ${Yellow}${cmod}${Purple}, rebuilding modules. If this message only shows once, this is normal!${NoColor}" fi