From: Michael Tremer Date: Fri, 5 Jun 2020 11:22:09 +0000 (+0000) Subject: debian: Do not destroy the build result X-Git-Tag: 0.9.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=695c4e6355ab2ecdbffa03de2aa74d674afceffd;p=location%2Flibloc.git debian: Do not destroy the build result Signed-off-by: Michael Tremer --- diff --git a/debian/build.sh b/debian/build.sh index 774c54d..6ae92ed 100644 --- a/debian/build.sh +++ b/debian/build.sh @@ -49,6 +49,7 @@ main() { if ! sbuild-createchroot --arch="${host_arch}" "${release}" \ "${CHROOT_PATH}/${chroot}"; then echo "Could not create chroot for ${release} on ${host_arch}" >&2 + rm -rf "${tmp}" return 1 fi fi @@ -65,6 +66,7 @@ main() { # Run the build process if ! sbuild --dist="${release}" --host="${arch}" --source "sources/${package}"; then echo "Could not build package for ${release} on ${arch}" >&2 + rm -rf "${tmp}" return 1 fi @@ -79,8 +81,10 @@ main() { rm -rf "${tmp}/sources" popd - # Cleanup - rm -rf "${tmp}" + # Done! + echo "SUCCESS!" + echo " You can find your Debian packages in ${tmp}" + return 0 } main "$@" || exit $?