From eba1ecac341a32c5b450984ae865918766565e94 Mon Sep 17 00:00:00 2001 From: "taylor.smock" Date: Mon, 7 Oct 2024 11:36:26 +0000 Subject: [PATCH] Fix #23951: Fix `free` in startup linux scripts when it is in a localized environment git-svn-id: https://josm.openstreetmap.de/svn/trunk@19234 0c6e7542-c601-0410-84e7-c038aed88b3b --- native/linux/latest/usr/bin/josm-latest | 2 +- native/linux/tested/usr/bin/josm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/native/linux/latest/usr/bin/josm-latest b/native/linux/latest/usr/bin/josm-latest index 401a0dc5a9..7b2755b85c 100755 --- a/native/linux/latest/usr/bin/josm-latest +++ b/native/linux/latest/usr/bin/josm-latest @@ -58,7 +58,7 @@ if [ -f "/etc/default/${JOSM_VERSION}" ]; then fi # If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things. -if [ "$(free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then +if [ "$(LC_ALL=C LANG=C free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then # But don't set anything if JAVA_OPTS is already set. JAVA_OPTS="${JAVA_OPTS:=-XX:MaxRAMPercentage=75.0 -Xms256m}" fi diff --git a/native/linux/tested/usr/bin/josm b/native/linux/tested/usr/bin/josm index 3611f3815d..e82c6788ad 100755 --- a/native/linux/tested/usr/bin/josm +++ b/native/linux/tested/usr/bin/josm @@ -58,7 +58,7 @@ if [ -f "/etc/default/${JOSM_VERSION}" ]; then fi # If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things. -if [ "$(free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then +if [ "$(LC_ALL=C LANG=C free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then # But don't set anything if JAVA_OPTS is already set. JAVA_OPTS="${JAVA_OPTS:=-XX:MaxRAMPercentage=75.0 -Xms256m}" fi