fix: get rounded integer RAM_HOST values
This commit is contained in:
parent
a36d51ac98
commit
1cf80e7d81
2
quickemu
2
quickemu
|
@ -561,7 +561,7 @@ function configure_ram() {
|
||||||
RAM_HOST=$(($(sysctl -n hw.memsize) / (1048576*1024)))
|
RAM_HOST=$(($(sysctl -n hw.memsize) / (1048576*1024)))
|
||||||
else
|
else
|
||||||
# Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output.
|
# Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output.
|
||||||
RAM_HOST=$(free --giga -h | tr ' ' '\n' | grep -m 1 "[0-9]" | cut -d'G' -f 1)
|
RAM_HOST=$(free --giga | tr ' ' '\n' | grep -m 1 "[0-9]" )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${RAM_HOST}" -ge 128 ]; then
|
if [ "${RAM_HOST}" -ge 128 ]; then
|
||||||
|
|
Loading…
Reference in New Issue