build.sh: don't error on source-only build
Ximin Luo
4 years ago
37 | 37 | SRCNAME="${DEBSRC}_${DEBVER}" |
38 | 38 | BUILDNAME="${DEBSRC}_${DEBVER}_${DEB_HOST_ARCH}" |
39 | 39 | if [ -z "$CHROOT" ]; then |
40 | #if schroot -i -c "debcargo-unstable-${DEB_HOST_ARCH}-sbuild" >/dev/null 2>&1; then | |
40 | if schroot -i -c "debcargo-unstable-${DEB_HOST_ARCH}-sbuild" >/dev/null 2>&1; then | |
41 | 41 | CHROOT="debcargo-unstable-${DEB_HOST_ARCH}-sbuild" |
42 | #el | |
43 | if schroot -i -c "unstable-${DEB_HOST_ARCH}-sbuild" >/dev/null 2>&1; then | |
42 | elif schroot -i -c "unstable-${DEB_HOST_ARCH}-sbuild" >/dev/null 2>&1; then | |
44 | 43 | CHROOT="unstable-${DEB_HOST_ARCH}-sbuild" |
45 | 44 | echo >&2 "Automatically using sbuild chroot unstable-${DEB_HOST_ARCH}-sbuild; however it's" |
46 | 45 | echo >&2 "strongly recommended to create a separate chroot debcargo-unstable-${DEB_HOST_ARCH}-sbuild" |
47 | 46 | echo >&2 "so your builds won't have to re-download & re-install cargo, rustc, and llvm every time." |
48 | 47 | echo >&2 "See README.rst section \"Build environment\" for details." |
49 | 48 | sleep 1 |
50 | else | |
49 | elif [ "$SOURCEONLY" != 1 ]; then | |
51 | 50 | abort 1 "could not automatically find a suitable chroot; set CHROOT" |
52 | 51 | fi |
53 | 52 | fi |