From f3d4fde15b51fd85a59c835d0310aac19d429737 Mon Sep 17 00:00:00 2001 From: Yan Date: Sun, 5 Oct 2025 22:53:22 +0200 Subject: [PATCH] Fix handling of non-integer ANDROID_PLATFORM ANDROID_PLATFORM is not always an integer; it can also be a value like "36.1". Handle such cases properly. This fixes the following error: server/build_without_gradle.sh: line 89: [[: 36.1: syntax error: invalid arithmetic operator (error token is ".1") PR #6408 Signed-off-by: Romain Vimont --- server/build_without_gradle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/build_without_gradle.sh b/server/build_without_gradle.sh index 8c572f62..bb477a32 100755 --- a/server/build_without_gradle.sh +++ b/server/build_without_gradle.sh @@ -86,7 +86,7 @@ javac -encoding UTF-8 -bootclasspath "$ANDROID_JAR" \ echo "Dexing..." cd "$CLASSES_DIR" -if [[ $PLATFORM -lt 31 ]] +if [[ "${PLATFORM%%.*}" -lt 31 ]] then # use dx "$BUILD_TOOLS_DIR/dx" --dex --output "$BUILD_DIR/classes.dex" \