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
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
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 \