diff options
-rw-r--r-- | bashrc | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -62,7 +62,13 @@ 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)) +if [ -n "$DISTCC_HOSTS" ] ; then + TASKS=$(echo $DISTCC_HOSTS | tr ' ' '\n' | cut -d / -f2 | paste -s -d+ | bc) +elif [ -x /usr/bin/distcc ] ; then + TASKS=$(distcc -j) +else + TASKS=$((($CORES + $CPUS) / 2)) +fi export FEATURES="ccache" alias :e="gvim" alias d="cd ~/dev" |