Merge "Use $((EXPRESSION)) instead of $[EXPRESSION]"
This commit is contained in:
commit
de60893ccd
@ -20,7 +20,7 @@ function tmpfs_check() {
|
|||||||
total_kB=$(awk '/^MemTotal/ { print $2 }' /proc/meminfo)
|
total_kB=$(awk '/^MemTotal/ { print $2 }' /proc/meminfo)
|
||||||
# tmpfs uses by default 50% of the available RAM, so the RAM should be at least
|
# tmpfs uses by default 50% of the available RAM, so the RAM should be at least
|
||||||
# the double of the minimum tmpfs size required
|
# the double of the minimum tmpfs size required
|
||||||
RAM_NEEDED=$[ $DIB_MIN_TMPFS * 2 ]
|
RAM_NEEDED=$(($DIB_MIN_TMPFS * 2))
|
||||||
[ $total_kB -lt $(($RAM_NEEDED*1024*1024)) ] || return 0
|
[ $total_kB -lt $(($RAM_NEEDED*1024*1024)) ] || return 0
|
||||||
echo "Not enough RAM to use tmpfs for build. ($total_kB < ${RAM_NEEDED}G)"
|
echo "Not enough RAM to use tmpfs for build. ($total_kB < ${RAM_NEEDED}G)"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user