]> git.donarmstrong.com Git - cran2deb.git/blob - branch/double_build/exec/build_some
split view of debian_dependency and blacklist_packages by system; preparation for...
[cran2deb.git] / branch / double_build / 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
15 for (pkg in `{cat all_pkgs}) {
16     if (~ $pkg *..* */*) {
17         echo bad name $pkg >>fail/ERROR
18     } else if ([ -e warn/$pkg ]) {
19         echo skipping $pkg...
20     } else if ([ -e fail/$pkg ]) {
21         echo skipping failed $pkg...
22     } else {
23         echo -n .. package $pkg
24         fail=0
25         cran2deb build $pkg >fail/$pkg >[2=1] || fail=1
26         if (~ $fail 0) {
27             echo success
28             grep '^[WE]:' fail/$pkg >warn/$pkg
29 #            if (~ `{stat -c '%s' warn/$pkg} 0) {
30 #                rm -f warn/$pkg
31 #            }
32             rm -f fail/$pkg
33         } else {
34             echo FAILED
35         }
36     }
37 }