summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bashrc4
1 files changed, 3 insertions, 1 deletions
diff --git a/bashrc b/bashrc
index 36640e7..01a8844 100644
--- a/bashrc
+++ b/bashrc
@@ -61,6 +61,8 @@ sizes() {
PATH="/usr/lib/ccache/bin:$PATH"
CORES=$(grep core\ id /proc/cpuinfo | sort -u | wc -l)
+CPUS=$(grep core\ id /proc/cpuinfo -c)
+TASKS=$((($CORES + $CPUS) / 2))
export FEATURES="ccache"
alias :e="gvim"
alias d="cd ~/dev"
@@ -83,7 +85,7 @@ vg() {
}
build() {
title "Build in progress"
- CCACHE_BASEDIR=$(git root) nice -n5 b2 -j$CORES $@
+ CCACHE_BASEDIR=$(git root) nice -n5 b2 -j$TASKS $@
rtn=$?
if [ $rtn -eq 0 ]; then
title "Build success ${PWD/#$HOME/\~}"