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() { ...@@ -102,12 +102,17 @@ function git_tree() {
# compute the number of cpus in this system. used to parallelize the build. # compute the number of cpus in this system. used to parallelize the build.
function get_ncpus() { function get_ncpus() {
if [ -f /proc/cpuinfo ]; then local n
grep bogomips /proc/cpuinfo | wc -l n=$(grep processor /proc/cpuinfo 2>/dev/null)
elif [ $system = darwin ] ; then if [ $? = 0 ] ; then
sysctl -n hw.ncpu echo "$n" | wc -l
else 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 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