grep /proc/cpuinfo -> getconf _NPROCESSORS_ONLN
This commit is contained in:
parent
d2b7425db7
commit
7b39bc5f26
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue