3 success=`{ls /var/cache/cran2deb/results/*.deb | wc -l}
4 echo $success successful packages
7 fn count_dup { sort | uniq -c | sort -n}# | awk '$1 > 1{print}' }
8 fn collapse { a=`{echo $^* | sed -e 's/ | /|/g'}; echo $^a }
10 {for (x in (warn/* /dev/null)) cut -d: -f3- <$x | sort -u} | awk '{print $1}' | count_dup
13 faildep=('^Error: package ''.*'' could not be loaded'
14 '|' '^ERROR: lazy loading failed for package ''.*'''
15 '|' '^[[:space:]]*package .* is not available'
16 '|' 'there is no package called ''.*''')
17 faildeb='do not know what to do with SystemRequirement:'
18 faillic=('No acceptable license: ')
19 failspc=': No space left on device'
20 failhdr='error: .*\.hp?p?: No such file or directory'
21 faildep=`{collapse $faildep}
23 faillic=`{collapse $faillic}
27 nfaildep=`{grep -El $faildep fail/* /dev/null | wc -l}
28 echo $nfaildep failed R dependencies.
29 grep -Eh $faildep fail/* | count_dup
31 #total=$total+$nfaildep
34 nfaillic=`{grep -El $faillic `{grep -EL $other fail/*} /dev/null | wc -l}
35 echo $nfaillic failed licenses.
36 grep -Eh $faillic `{grep -EL $other fail/*} | count_dup
37 other=$other^'|'^$faillic
38 total=$total+$nfaillic
41 nfailspc=`{grep -El $failspc `{grep -EL $other fail/*} /dev/null | wc -l}
42 echo $nfailspc out of space
43 other=$other^'|'^$failspc
44 total=$total+$nfailspc
47 nfailhdr=`{grep -El $failhdr `{grep -EL $other fail/*} /dev/null | wc -l}
48 echo $nfailhdr missing C header
49 grep -Eh $failhdr `{grep -EL $other fail/* /dev/null} | count_dup
50 other=$other^'|'^$failhdr
51 total=$total+$nfailhdr
54 nfaildeb=`{grep -El $faildeb `{grep -EL $other fail/*} /dev/null | wc -l}
55 echo $nfaildeb system requirement failures.
56 grep -Eh $faildeb `{grep -EL $other fail/* /dev/null} | count_dup
57 other=$other^'|'^$faildeb
58 total=$total+$nfaildeb
61 nfailother=`{hoc -e `{grep -EL $other fail/* /dev/null | wc -l}^-1}
62 echo $nfailother other failures.
64 total=`{hoc -e $total}
65 succrate=`{hoc -e $success/'('$total')*100'}
66 echo $succrate% success rate '('$total' total)'
67 #total=`{hoc -e $total-$nfaillic-$nfailspc-$nfailhdr}
68 total=`{hoc -e $total-$nfaillic-$nfailspc}
69 succrate=`{hoc -e $success/'('$total')*100'}
70 echo $succrate% success rate with exclusions '('$total' total)'
71 grep -EL $other fail/* /dev/null | xargs tail -n 20