From aec6ffbfc0289c83082f1de49de081c5111e0e01 Mon Sep 17 00:00:00 2001 From: the Sane <3657071+the-sane@users.noreply.github.com> Date: Sat, 20 Feb 2021 18:01:13 -0500 Subject: [PATCH] Fix floating point math --- lug-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lug-helper.sh b/lug-helper.sh index 0bbbd83..303167d 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -641,7 +641,7 @@ filelimit_check() { # Check total system memory memory_check() { memtotal="$(awk '/MemTotal/ {printf "%.1f \n", $2/1024/1024}' /proc/meminfo)" - if awk 'BEGIN {exit !("$memtotal" > 15)}'; then + if [ ${memtotal%.*} -ge "15" ]; then preflight_pass+=("Your system has $memtotal GB of memory.") else preflight_fail+=("Your system has $memtotal GB of memory.\nWe recommend at least 16 GB to avoid crashes.")