]> git.donarmstrong.com Git - cran2deb.git/blob - tags/gsoc_final/exec/build_some
679eed2e153e4e974b5c107d0e4187b79f481eb6
[cran2deb.git] / tags / gsoc_final / exec / build_some
1 #!/usr/bin/rc
2 ## DOC: cran2deb build_some [taskview1 taskview2 ...]
3 ## DOC:     build some packages, logging warnings into ./warn/$package
4 ## DOC:     and failures into ./fail/$package. with no arguments a random
5 ## DOC:     sample of packages is built.  the file ./all_pkgs overrides this
6 ## DOC:     behaviour and is expected to be a list of packages to build.
7 ## DOC:
8
9 mkdir -p warn fail
10 shift
11 if ([ ! -e all_pkgs ]) {
12     cran2deb cran_pkgs $* >all_pkgs
13 }
14 for (pkg in `{cat all_pkgs}) {
15     if (~ $pkg *..* */*) {
16         echo bad name $pkg >>fail/ERROR
17     } else if ([ -e warn/$pkg ]) {
18         echo skipping $pkg...
19     } else if ([ -e fail/$pkg ]) {
20         echo skipping failed $pkg...
21     } else {
22         echo -n .. package $pkg
23         fail=0
24         cran2deb build $pkg >fail/$pkg >[2=1] || fail=1
25         if (~ $fail 0) {
26             echo success
27             grep '^[WE]:' fail/$pkg >warn/$pkg
28 #            if (~ `{stat -c '%s' warn/$pkg} 0) {
29 #                rm -f warn/$pkg
30 #            }
31             rm -f fail/$pkg
32         } else {
33             echo FAILED
34         }
35     }
36 }