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[@]} &&
|
in_list "$EGENCACHE" ${TRUE_LIST[@]} &&
|
||||||
if [[ "git" == "$SYNC_TYPE" ]]; then
|
if [[ "git" == "$SYNC_TYPE" ]]; then
|
||||||
echo "---------- Updating metadata cache for Git portage tree ----------"
|
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
|
[ 0 -ne $? ] && echo "Stage $STAGE: Metadata update failed ;-( =======" && exit $STAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ fi
|
||||||
# disable distcc for -march=native -mtune=native
|
# disable distcc for -march=native -mtune=native
|
||||||
|
|
||||||
grep 'CONFIG_X86_MARCH_NATIVE=y' .config &>/dev/null
|
grep 'CONFIG_X86_MARCH_NATIVE=y' .config &>/dev/null
|
||||||
jobs=$((`grep "^processor" /proc/cpuinfo -c`+1))
|
jobs=$((`getconf _NPROCESSORS_ONLN`+1))
|
||||||
if [[ "$?" == 0 ]]; then
|
if [[ "$?" == 0 ]]; then
|
||||||
$NICE_CMD make -j$jobs
|
$NICE_CMD make -j$jobs
|
||||||
[ 0 -ne $? ] && echo "Kernel build failed ;-(" && exit -1
|
[ 0 -ne $? ] && echo "Kernel build failed ;-(" && exit -1
|
||||||
|
|
Loading…
Reference in New Issue