X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tags%2Fgsoc_final%2Fexec%2Fbuild_some;fp=tags%2Fgsoc_final%2Fexec%2Fbuild_some;h=679eed2e153e4e974b5c107d0e4187b79f481eb6;hb=5101cce1568b46d042316f32c8216e956f76ff65;hp=0000000000000000000000000000000000000000;hpb=1d3c6e2092b87a8e640704ce3ceec4e8ece3859e;p=cran2deb.git diff --git a/tags/gsoc_final/exec/build_some b/tags/gsoc_final/exec/build_some new file mode 100755 index 0000000..679eed2 --- /dev/null +++ b/tags/gsoc_final/exec/build_some @@ -0,0 +1,36 @@ +#!/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 + } + } +}