diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-06 20:07:06 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-06 20:07:06 +0100 |
commit | 5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52 (patch) | |
tree | 3fb7d9bd8a7c882aa07e6a98bf381228e0126394 /virtual | |
parent | Use ccache (diff) | |
download | portage-5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52.tar.bz2 portage-5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52.tar.xz portage-5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52.zip |
Use all the cores
Diffstat (limited to 'virtual')
-rwxr-xr-x | virtual/miller-base/files/update-kernel | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/virtual/miller-base/files/update-kernel b/virtual/miller-base/files/update-kernel index 076a3c8..0720ad9 100755 --- a/virtual/miller-base/files/update-kernel +++ b/virtual/miller-base/files/update-kernel @@ -1,14 +1,15 @@ #!/bin/bash +CORES=$(grep core\ id /proc/cpuinfo | sort -u | wc -l) PATH="/usr/lib/ccache/bin:$PATH" cd /usr/src/linux || ( echo "No kernel directory"; exit 1 ) [ -f .config ] || ( echo "No kernel configuration"; exit 1 ) -make -j2 || ( echo "Make failed" ; exit 1 ) -make modules -j2 || ( echo "Make modules failed" ; exit 1 ) -make modules_install -j2 || ( echo "Make modules install failed" ; exit 1 ) +make -j$CORES || ( echo "Make failed" ; exit 1 ) +make modules -j$CORES || ( echo "Make modules failed" ; exit 1 ) +make modules_install -j$CORES || ( echo "Make modules install failed" ; exit 1 ) emerge -q1 @module-rebuild || exit 1 -make install -j2 || ( echo "Make install failed" ; exit 1 ) +make install -j$CORES || ( echo "Make install failed" ; exit 1 ) KV=$(head $(ls -1t /boot/config-* | head -n1) -n3 | tail -n1 | cut -d ' ' -f 3) if [ -x /usr/bin/dracut ] ; then |