Skip to content

Commit c60ecb3

Browse files
committed
fix: compare RAM requirement to system's available RAM
allow numbers with decimal points to be compared
1 parent e90a68a commit c60ecb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lgsm/modules/check_system_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fi
6363

6464
# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
6565
if [ "${ramrequirementgb}" ]; then
66-
if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then
66+
if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then
6767
fn_print_dots "Checking RAM"
6868
fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
6969
echo "* ${gamename} server may fail to run or experience poor performance."

0 commit comments

Comments
 (0)