From 327a998e2b3be2c7f0574c2862e18eadd5070947 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 3 Aug 2011 15:21:30 +0200 Subject: [PATCH] id-pbuild.sh calls id-mk-deb-src.sh automatically --- id-deb-build/id-pbuild-root.sh | 11 +++++++---- id-deb-build/id-pbuild.sh | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/id-deb-build/id-pbuild-root.sh b/id-deb-build/id-pbuild-root.sh index d37e205..3eeb85e 100755 --- a/id-deb-build/id-pbuild-root.sh +++ b/id-deb-build/id-pbuild-root.sh @@ -38,11 +38,14 @@ done PBUILDER=/usr/sbin/pbuilder rm -fr ${dist}-${arch} -if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then - DIST=$dist ARCH=$arch $PBUILDER --create + +if test "$dsc"; then + if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then + DIST=$dist ARCH=$arch $PBUILDER --create + fi + DIST=$dist ARCH=$arch $PBUILDER --update --override-config + DIST=$dist ARCH=$arch $PBUILDER --build $dsc fi -DIST=$dist ARCH=$arch $PBUILDER --update --override-config -DIST=$dist ARCH=$arch $PBUILDER --build $dsc # Local Variables: # mode:shell-script diff --git a/id-deb-build/id-pbuild.sh b/id-deb-build/id-pbuild.sh index b9cd94d..501eb6c 100755 --- a/id-deb-build/id-pbuild.sh +++ b/id-deb-build/id-pbuild.sh @@ -64,6 +64,18 @@ if test ! -x $PBUILDROOT; then exit 1 fi +MKDEBSRC=`dirname $0`/id-mk-deb-src.sh +if test ! -x $MKDEBSRC; then + echo "$MKDEBSRC not found" + exit 1 +fi + +if test -d deb-src; then + cd deb-src +else + $MKDEBSRC +fi + if test -d deb-src; then cd deb-src fi @@ -113,9 +125,16 @@ if $upload; then fi rm -f *.log +# call our privileged wrapper to clean the directories, no --dsc option +for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do + for arch in ${USE_ARCHS}; do + sudo -n $PBUILDROOT --dist=$dist --arch=$arch + done +done + +# call our privileged wrapper to do the real work, with --dsc option i=0 date - for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do for arch in ${USE_ARCHS}; do sudo -n $PBUILDROOT \ -- 1.7.10.4