source: trunk/debathena/scripts/chroot-sources @ 25733

Revision 25733, 1.4 KB checked in by jdreed, 12 years ago (diff)
Update chroot-sources to match do-build now that we're using -stagging
  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3# Usage (e.g.): sbuild --chroot-sources=/path/to/chroot-sources
4
5# Adjust /etc/apt/sources.list.d/debathena.list using the
6# DEBATHENA_RELEASE environment variable (set to either "production",
7# "-proposed", or "-development"),
8#
9# If DEBATHENA_RELEASE is unset, assume we're building out of -development.
10
11: ${DEBATHENA_RELEASE=-development}
12: ${DEBATHENA_MIRROR:=http://debathena.mit.edu/apt}
13dist="$SBUILD_BUILD_CONF_DISTRIBUTION"
14list=/etc/apt/sources.list.d/debathena.list
15
16rm -f "$list"
17
18cat >>"$list" <<EOF
19deb $DEBATHENA_MIRROR $dist debathena debathena-config
20deb-src $DEBATHENA_MIRROR $dist debathena debathena-config
21EOF
22
23if [ "$DEBATHENA_RELEASE" = "-staging" ]; then
24    cat >>"$list" <<EOF
25deb $DEBATHENA_MIRROR ${dist}-staging debathena debathena-config
26deb-src $DEBATHENA_MIRROR ${dist}-staging debathena debathena-config
27EOF
28    DEBATHENA_RELEASE="-development"
29fi
30
31if [ "$DEBATHENA_RELEASE" = "-proposed" ] || [ "$DEBATHENA_RELEASE" = "-development" ]; then
32    cat >>"$list" <<EOF
33deb $DEBATHENA_MIRROR ${dist}-proposed debathena debathena-config
34deb-src $DEBATHENA_MIRROR ${dist}-proposed debathena debathena-config
35EOF
36fi
37
38if [ "$DEBATHENA_RELEASE" = "-development" ]; then
39    cat >>"$list" <<EOF
40deb $DEBATHENA_MIRROR ${dist}-development debathena debathena-config
41deb-src $DEBATHENA_MIRROR ${dist}-development debathena debathena-config
42EOF
43fi
44
45DEBIAN_FRONTEND=noninteractive apt-get update
Note: See TracBrowser for help on using the repository browser.