1#!/bin/bash 2# 3# This script sets up a schroot suitable for building e2fsprogs 4# on a Debian portable box 5 6while [ "$1" != "" ]; 7do 8 case "$1" in 9 --base) shift 10 BASE_CHROOT="$1" 11 ;; 12 --chroot) shift 13 CHROOT="$1" 14 ;; 15 --help|help) 16 echo "Usage: setup-schroot [--base <base_chroot>] [--chroot <chroot>]" 17 exit 0 18 ;; 19 *) 20 echo "unknown option: $1" 21 exit 1 22 ;; 23 esac 24 shift 25done 26 27if test -z "$BASE_CHROOT" ; then 28 BASE_CHROOT=sid 29fi 30 31if test -z "$CHROOT" ; then 32 CHROOT="$USER-$BASE_CHROOT" 33fi 34 35echo "Setting up $CHROOT using $BASE_CHROOT..." 36schroot -b -n "$CHROOT" -c "$BASE_CHROOT" 37dd-schroot-cmd -c "$CHROOT" apt-get update 38dd-schroot-cmd -c "$CHROOT" -y apt-get upgrade 39dd-schroot-cmd -c "$CHROOT" -y apt-get build-dep e2fsprogs 40dd-schroot-cmd -c "$CHROOT" -y apt-get install git gdb emacs-nox lintian acl libreadline-dev 41echo " " 42echo "Start chroot by running: " 43echo "schroot -r -c $CHROOT" 44echo " " 45