bashrc & zshrc: fix #20 I hope.

Same output which nproc gives can be got with "sysctl -n hw.ncpu".
This commit is contained in:
Mikaela Suomalainen 2014-05-06 17:25:29 +03:00
parent b4ece3743b
commit 8638a420bc
2 changed files with 12 additions and 2 deletions

7
bashrc
View File

@ -264,7 +264,12 @@ export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# make
export NPROC=`nproc`
if [[ $UNAME != Darwin ]]; then
export NPROC=`nproc`
else
export NPROC=`sysctl -n hw.cpu`
fi
export MAKEFLAGS="-j$NPROC"
export MAKE="make $MAKEFLAGS"
alias make="make $MAKEFLAGS"

7
zshrc
View File

@ -202,7 +202,12 @@ export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# make
export NPROC=`nproc`
if [[ $UNAME != Darwin ]]; then
export NPROC=`nproc`
else
export NPROC=`sysctl -n hw.cpu`
fi
export MAKEFLAGS="-j$NPROC"
export MAKE="make $MAKEFLAGS"
alias make="make $MAKEFLAGS"