~ubuntu-branches/ubuntu/warty/sbuild/warty

« back to all changes in this revision

Viewing changes to bin/gochroot

  • Committer: Bazaar Package Importer
  • Author(s): Rick Younie
  • Date: 2002-03-03 21:51:51 UTC
  • Revision ID: james.westby@ubuntu.com-20020303215151-50oderv821xp634e
Tags: 0.4
made /etc/sbuild.conf a conffile - thanks Gergely Nagy.
(Closes: #136374)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
case $1 in
 
4
        -s|st|stable )
 
5
                DIST=stable ;;
 
6
        -f|fr|frozen )
 
7
                DIST=frozen ;;
 
8
        -u|un|unstable )
 
9
                DIST=unstable ;;
 
10
        * )
 
11
                echo "Usage: checkchroot stable|frozen|unstable" >&2
 
12
                echo "(can abbrev. chroot name to first 2 letters or -X)" >&2
 
13
                exit 1 ;;
 
14
esac
 
15
 
 
16
# see if the chroot root directory is set in environment, else use default
 
17
if [ ! -z "$SBUILD_CHROOT_ROOT" ]; then
 
18
        CHROOT_ROOT=$SBUILD_CHROOT_ROOT
 
19
else
 
20
        CHROOT_ROOT=/usr/local/chroot
 
21
fi
 
22
CHROOT=$CHROOT_ROOT/$DIST
 
23
 
 
24
# chroot procs should be mounted from base w. /etc/fstab entry instead
 
25
#sudo mount proc -t proc $CHROOT/proc
 
26
sudo chroot $CHROOT bin/sh
 
27
#sudo umount $CHROOT/proc
 
28