X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tags%2Fpre-dual%2Fexec%2Fbuild_some;fp=tags%2Fpre-dual%2Fexec%2Fbuild_some;h=da105fdb37b286797376f167c3f7a53302a97078;hb=ab9547f1dd3779e34528a7a638ed085d5b9c5e26;hp=0000000000000000000000000000000000000000;hpb=4baac28764128067cb2fd6343321e7e0f522bdfd;p=cran2deb.git diff --git a/tags/pre-dual/exec/build_some b/tags/pre-dual/exec/build_some new file mode 100755 index 0000000..da105fd --- /dev/null +++ b/tags/pre-dual/exec/build_some @@ -0,0 +1,37 @@ +#!/usr/bin/rc +## DOC: cran2deb build_some [taskview1 taskview2 ...] +## DOC: build some packages, logging warnings into ./warn/$package +## DOC: and failures into ./fail/$package. with no arguments a random +## DOC: sample of packages is built. the file ./all_pkgs overrides this +## DOC: behaviour and is expected to be a list of packages to build. +## DOC: + +mkdir -p warn fail +shift +if ([ ! -e all_pkgs ]) { + cran2deb cran_pkgs $* >all_pkgs +} + +for (pkg in `{cat all_pkgs}) { + if (~ $pkg *..* */*) { + echo bad name $pkg >>fail/ERROR + } else if ([ -e warn/$pkg ]) { + echo skipping $pkg... + } else if ([ -e fail/$pkg ]) { + echo skipping failed $pkg... + } else { + echo -n .. package $pkg + fail=0 + cran2deb build $pkg >fail/$pkg >[2=1] || fail=1 + if (~ $fail 0) { + echo success + grep '^[WE]:' fail/$pkg >warn/$pkg +# if (~ `{stat -c '%s' warn/$pkg} 0) { +# rm -f warn/$pkg +# } + rm -f fail/$pkg + } else { + echo FAILED + } + } +}