usage() {
echo "Usage: $0 <path to source code> <chroot location>"
- exit
+ exit 1
}
# used to check for needed files/programs
# debootstrap is needed
if [ "x`which debootstrap`" = "x" ]; then
echo "$0: cannot continue, please install debootstrap on your system"
- exit
+ exit 1
fi
echo "debootstrap location: `which debootstrap`"
# user must be root
if [ ! "x`whoami`" = "xroot" ]; then
echo "$0: you must be root to setup the chroot environment"
- exit
+ exit 1
fi
}
debootstrap $SARGE_DIST_NAME $CHROOT_DIR $DEBIAN_SARGE_MIRROR/
if [ $? != 0 ]; then
echo "$0: debootstrap failed, exiting"
- exit
+ exit 1
fi
mkdir $CHROOT_DIR/root/openitg-dev
if [ ! -d "$1" ]; then
echo "$0: Source code dir not found at $1"
- exit
+ exit 1
fi
verify_prog_requirements
SRC_DIR="`(cd $1; pwd)`"
setup_chroot $2 $SRC_DIR
+exit 0;