~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/buildd/override-sources-list

  • Committer: mbp at canonical
  • Date: 2011-11-20 23:37:23 UTC
  • mto: This revision was merged to the branch mainline in revision 14344.
  • Revision ID: mbp@canonical.com-20111120233723-370p96db2crru5tm
Delete canonical.buildd again

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
4
 
# GNU Affero General Public License version 3 (see the file LICENSE).
5
 
 
6
 
# Buildd Slave tool to override sources.list in the chroot with a list of
7
 
# archives
8
 
 
9
 
# Expects build id as arg 1
10
 
# Expects sources.list lines as subsequent args
11
 
 
12
 
# Needs SUDO to be set to a sudo instance for passwordless access
13
 
 
14
 
set -e
15
 
exec 2>&1
16
 
 
17
 
SUDO=/usr/bin/sudo
18
 
 
19
 
BUILDID="$1"
20
 
shift
21
 
 
22
 
cd $HOME
23
 
cd "build-$BUILDID/chroot-autobuild/etc/apt"
24
 
 
25
 
echo "Overriding sources.list in build-$BUILDID"
26
 
 
27
 
$SUDO rm -f sources.list.new
28
 
(for archive; do
29
 
  echo "$archive"
30
 
done) | $SUDO tee sources.list.new >/dev/null
31
 
$SUDO mv sources.list.new sources.list