X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=bin%2Ferrs2;h=cd0da8125fa2ead747c43a70910c3d3f217dce02;hb=2578c386273c3ec22a8d85eb52819433ba2406fd;hp=7563cf7492bb30d60bf7630ff50823b52964d3fe;hpb=64a3cb99fc3a3d6334fa2fef5d97bfed6d1034ed;p=nethome.git diff --git a/bin/errs2 b/bin/errs2 index 7563cf7..cd0da81 100755 --- a/bin/errs2 +++ b/bin/errs2 @@ -1,17 +1,30 @@ #! /bin/sh # $Id$ +renice +19 -p $$; ionice -c3 -p $$ + args="" if [ "$1" = "-a" ];then args="$args $1" shift fi +out=errs2 +if [ "$1" = "-n" ];then + out="$2" + shift 2 +fi j="" cpus="`getconf _NPROCESSORS_ONLN`" if [ -n "$cpus" ];then - j="-j$[$cpus+1]" + j="-j$[$cpus*3/2]" fi +rm -f $out.ok ( set -ex time nice make $j "$@" - ) 2>&1|tee $args errs2 + touch $out.ok + ) 2>&1|tee $args $out +test -f $out.ok +rc=$? +rm -f $out.ok +exit $rc