Skip to content

Commit

Permalink
fix: FREE_MEM
Browse files Browse the repository at this point in the history
FREE_MEM gets wrong value if LOCALE is distinct of English.

In spanish I get this error:

./build.sh: línea 70: /4000000 : error sintáctico: se esperaba un operando (el elemento de error es "/4000000 ")
./build.sh: línea 71: 4 <  ? 4 :  : error sintáctico: se esperaba un operando (el elemento de error es "? 4 :  ")
  • Loading branch information
xusy2k committed Aug 10, 2018
1 parent 0d4befe commit a029fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [[ `uname` == 'Darwin' ]]; then
read -ra FREE_MEM <<< "$FREE_MEM"
FREE_MEM=$((${FREE_MEM[2]%?}*(4096))) # free pages * page size
else
FREE_MEM=`free | grep "Mem:" | awk '{print $4}'`
FREE_MEM=`LANG=C free | grep "Mem:" | awk '{print $4}'`
fi

CORES_AVAIL=`getconf _NPROCESSORS_ONLN`
Expand Down

0 comments on commit a029fd8

Please sign in to comment.