rpmsafereduce: revert
[nethome.git] / bin / errs2
1 #! /bin/bash
2
3 renice +19 -p $$; ionice -c3 -p $$
4
5 args=""
6 if [ "$1" = "-a" ];then
7         args="$args $1"
8         shift
9 fi
10 out=errs2
11 if [ "$1" = "-n" ];then
12         out="$2"
13         shift 2
14 fi
15 j=""
16 cpus="`getconf _NPROCESSORS_ONLN`"
17 if [ -n "$cpus" ];then
18         j="-j$[$cpus*3/2]"
19 fi
20 rm -f $out.ok
21 (
22         set -ex
23         time nice make $j "$@"
24         if [ -d gdb/testsuite ];then
25                 make -C gdb/testsuite site.exp
26         fi
27         touch $out.ok
28         ) 2>&1|tee $args $out
29 test -f $out.ok
30 rc=$?
31 rm -f $out.ok
32 exit $rc