summaryrefslogtreecommitdiffstats
path: root/bin/schroot-create.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/schroot-create.sh')
-rwxr-xr-xbin/schroot-create.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index f59010b1..5f31e3cd 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -53,6 +53,11 @@ bootstrap() {
echo "deb-src $MIRROR $DISTRO main" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list > /dev/null
echo "${BACKPORTS}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null
echo "${BACKPORTSSRC}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null
+
+ sudo chroot $CHROOT_TARGET apt-get update
+ if [ -n "$1" ] ; then
+ sudo chroot $CHROOT_TARGET apt-get install -y --no-install-recommends "$@"
+ fi
}
cleanup() {
@@ -61,7 +66,7 @@ cleanup() {
fi
}
trap cleanup INT TERM EXIT
-bootstrap
+bootstrap $@
trap - INT TERM EXIT
@@ -91,8 +96,4 @@ sudo tee /etc/schroot/chroot.d/jenkins-"$TARGET" <<-__END__
union-type=aufs
__END__
-schroot --directory /root -c "source:jenkins-$TARGET" -u root -- apt-get update
-if [ -n "$1" ]
-then
- schroot --directory /root -c "source:jenkins-$TARGET" -u root -- apt-get install -y --no-install-recommends "$@"
-fi
+