~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/buildd/remove-build

  • 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 remove an unmounted chroot
7
 
 
8
 
# Expects build id as arg 1, makes build-id to contain the build
9
 
 
10
 
# Needs RM to be set to a gnu rm instance
11
 
# Needs SUDO to be set to a sudo instance for passwordless access
12
 
 
13
 
RM=/bin/rm
14
 
SUDO=/usr/bin/sudo
15
 
BUILDID="$1"
16
 
 
17
 
set -e
18
 
 
19
 
exec 2>&1
20
 
 
21
 
echo "Removing build $BUILDID"
22
 
 
23
 
cd $HOME
24
 
 
25
 
$SUDO $RM -rf "build-$BUILDID"