fi
else
if test -d deb-src; then
- echo "Remove deb-src"
- exit 1
+ rm -rf deb-src
+ if test $? -ne 0; then
+ echo "deb-src could not be removed. Remove deb-src manually"
+ exit 1
+ fi
fi
$MKDEBSRC
fi
echo "Debian distros: $DEBIAN_DIST"
if test "${SUDO_USER}"; then
echo "Running as sudo."
- echo "You can avoid it by adding the following in /etc/sudoers"
+ echo "Tip: You can avoid it by adding the following in /etc/sudoers"
echo "${SUDO_USER} ALL=NOPASSWD: ${ID_DEB_BUILD}/id-pbuild-root.sh"
HOME_EXPORT=/home/${SUDO_USER}
else
+ sudo -k
HOME_EXPORT=$HOME
fi
if test ! -f ${HOME_EXPORT}/.pbuilderrc; then
for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do
for arch in ${USE_ARCHS}; do
sudo -n $PBUILDROOT --home=${HOME_EXPORT} --dist=$dist --arch=$arch
+ if test $? -ne 0; then
+ echo "FAILED"
+ echo "Run id-pbuild.sh using sudo or add yourself to /etc/sudoers:"
+ echo "${USER} ALL=NOPASSWD: ${ID_DEB_BUILD}/id-pbuild-root.sh"
+ exit 1
+ fi
done
done
if test -f ${dist}-${arch}/*.dsc; then
:
else
- echo "No .dsc file for ${dist}-${arch}"
+ echo "FAILED: No .dsc file for ${dist}-${arch}"
exit 1
fi
fi
if test -f ${dist}-${arch}/*.dsc; then
:
else
- echo "No .dsc file for ${dist}-${arch}"
+ echo "FAILED: No .dsc file for ${dist}-${arch}"
exit 1
fi
done