Skip to content

Commit f3d4fde

Browse files
Yanrom1v
authored andcommitted
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 <#6408> Signed-off-by: Romain Vimont <[email protected]>
1 parent eee3f24 commit f3d4fde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/build_without_gradle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ javac -encoding UTF-8 -bootclasspath "$ANDROID_JAR" \
8686
echo "Dexing..."
8787
cd "$CLASSES_DIR"
8888

89-
if [[ $PLATFORM -lt 31 ]]
89+
if [[ "${PLATFORM%%.*}" -lt 31 ]]
9090
then
9191
# use dx
9292
"$BUILD_TOOLS_DIR/dx" --dex --output "$BUILD_DIR/classes.dex" \

0 commit comments

Comments
 (0)