grep /proc/cpuinfo -> getconf _NPROCESSORS_ONLN

This commit is contained in:
Kolan Sh 2013-01-10 13:49:27 +04:00
parent d2b7425db7
commit 7b39bc5f26
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ if [ $STAGE_CNT -eq $STAGE ]; then
in_list "$EGENCACHE" ${TRUE_LIST[@]} &&
if [[ "git" == "$SYNC_TYPE" ]]; then
echo "---------- Updating metadata cache for Git portage tree ----------"
$NICE_CMD egencache --repo=gentoo --update --jobs=$((`grep "^processor" /proc/cpuinfo -c`+1))
$NICE_CMD egencache --repo=gentoo --update --jobs=$((`getconf _NPROCESSORS_ONLN`+1))
[ 0 -ne $? ] && echo "Stage $STAGE: Metadata update failed ;-( =======" && exit $STAGE
fi

View File

@ -63,7 +63,7 @@ fi
# disable distcc for -march=native -mtune=native
grep 'CONFIG_X86_MARCH_NATIVE=y' .config &>/dev/null
jobs=$((`grep "^processor" /proc/cpuinfo -c`+1))
jobs=$((`getconf _NPROCESSORS_ONLN`+1))
if [[ "$?" == 0 ]]; then
$NICE_CMD make -j$jobs
[ 0 -ne $? ] && echo "Kernel build failed ;-(" && exit -1