X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=id-deb-build%2Fid-pbuild-all.sh;h=3af753a38854eb3a61d908823ecf02eceea04217;hb=10fecddf16262d3ca5d0d52ec01e97e3fb2dbf3a;hp=278302ffb11d4e13cf4f712dbab30145f6dbac53;hpb=37fb742ea0361030c92310a2b7d9638ad483a240;p=git-tools-moved-to-github.git diff --git a/id-deb-build/id-pbuild-all.sh b/id-deb-build/id-pbuild-all.sh index 278302f..3af753a 100755 --- a/id-deb-build/id-pbuild-all.sh +++ b/id-deb-build/id-pbuild-all.sh @@ -32,23 +32,46 @@ if test "$2" = "upload"; then for dist in ${DEBIAN_DIST}; do scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/debian/${dist} done + echo "Remember to update APT on ftp.indexdata.dk" + echo "cd git-tools/update-archive" + echo "sudo su" + echo "./update-archive.sh" exit 0 fi +i=0 +concurrency=4 +echo "Building $PKG" +date for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do - for arch in i386 amd64; do - if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then - DIST=$dist ARCH=$arch pbuilder create - fi - if $update; then - DIST=$dist ARCH=$arch pbuilder update --override-config - fi - DIST=$dist ARCH=$arch pbuilder --build $PKG - if test -f ${dist}-${arch}/*.dsc; then - : - else - echo "No .dsc file for ${dist}-${arch}" - exit 1 - fi - done + for arch in i386 amd64; do + rm -fr ${dist}-${arch} + ( + if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then + DIST=$dist ARCH=$arch pbuilder create + fi + if $update; then + DIST=$dist ARCH=$arch pbuilder update --override-config + fi + DIST=$dist ARCH=$arch pbuilder --build $PKG + ) >${dist}-${arch}.log 2>&1 & + i=`expr $i + 1` + if test $i -eq $concurrency; then + i=0 + wait + fi + done done - +wait +for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do + for arch in i386 amd64; do + + if test -f ${dist}-${arch}/*.dsc; then + : + else + echo "No .dsc file for ${dist}-${arch}" + exit 1 + fi + done +done +date +echo "Done"