Codebase list rust-stfu8 / 43b8c90
build.sh: better handling of CHROOT Ximin Luo 4 years ago
1 changed file(s) with 14 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3636 DEB_HOST_ARCH=$(dpkg-architecture -q DEB_HOST_ARCH)
3737 SRCNAME="${DEBSRC}_${DEBVER}"
3838 BUILDNAME="${DEBSRC}_${DEBVER}_${DEB_HOST_ARCH}"
39 if [ -z "$CHROOT" ] && schroot -i -c "debcargo-unstable-${DEB_HOST_ARCH}-sbuild" >/dev/null 2>&1; then
40 CHROOT="debcargo-unstable-${DEB_HOST_ARCH}-sbuild"
39 if [ -z "$CHROOT" ]; then
40 #if schroot -i -c "debcargo-unstable-${DEB_HOST_ARCH}-sbuild" >/dev/null 2>&1; then
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
44 CHROOT="unstable-${DEB_HOST_ARCH}-sbuild"
45 echo >&2 "Automatically using sbuild chroot unstable-${DEB_HOST_ARCH}-sbuild; however it's"
46 echo >&2 "strongly recommended to create a separate chroot debcargo-unstable-${DEB_HOST_ARCH}-sbuild"
47 echo >&2 "so your builds won't have to re-download & re-install cargo, rustc, and llvm every time."
48 echo >&2 "See README.rst section \"Build environment\" for details."
49 sleep 1
50 else
51 abort 1 "could not automatically find a suitable chroot; set CHROOT"
52 fi
4153 fi
4254
4355 shouldbuild() {