Round up host RAM. Closes #11
Avoid "integer expression expected" errors when host RAM enumeration returns a floating point value. * https://github.com/wimpysworld/quickemu/issues/11
This commit is contained in:
parent
fb082f1079
commit
142eac3001
2
quickemu
2
quickemu
@ -199,6 +199,8 @@ function vm_boot() {
|
||||
|
||||
local RAM_VM="2G"
|
||||
local RAM_HOST=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g')
|
||||
#Round up - https://github.com/wimpysworld/quickemu/issues/11
|
||||
RAM_HOST=$(printf '%.*f\n' 0 ${RAM_HOST})
|
||||
if [ ${RAM_HOST} -ge 64 ]; then
|
||||
RAM_VM="4G"
|
||||
elif [ ${RAM_HOST} -ge 16 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user