Merge pull request #240 from izx64/patch-1

Update install.sh
This commit is contained in:
Val Markovic 2013-04-09 18:11:58 -07:00
commit 0502ef1958

View File

@ -47,16 +47,21 @@ function python_finder {
}
function num_cores {
num_cpus=1
if [[ `uname -s` == "Linux" ]]; then
num_cpus=$(grep -c ^processor /proc/cpuinfo)
if [[ -e /bin/nproc ]]; then
num_cpus=$(nproc)
else
# Works on Mac and FreeBSD
num_cpus=$(sysctl -n hw.ncpu)
num_cpus=1
if [[ `uname -s` == "Linux" ]]; then
num_cpus=$(grep -c ^processor /proc/cpuinfo)
else
# Works on Mac and FreeBSD
num_cpus=$(sysctl -n hw.ncpu)
fi
fi
echo $num_cpus
}
function install {
ycm_dir=`pwd`
build_dir=`mktemp -d -t ycm_build.XXXXXX`