Commit f703aa70 authored by Yoni Fogel's avatar Yoni Fogel

Merge branch 'master' of github.com:Tokutek/ft-engine

parents 782daeac 13870542
......@@ -102,12 +102,17 @@ function git_tree() {
# compute the number of cpus in this system. used to parallelize the build.
function get_ncpus() {
if [ -f /proc/cpuinfo ]; then
grep bogomips /proc/cpuinfo | wc -l
elif [ $system = darwin ] ; then
sysctl -n hw.ncpu
local n
n=$(grep processor /proc/cpuinfo 2>/dev/null)
if [ $? = 0 ] ; then
echo "$n" | wc -l
else
echo 1
n=$(sysctl -n hw.ncpu 2>/dev/null)
if [ $? = 0 ] ; then
echo $n
else
echo 1 # default is 1 cpu
fi
fi
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment