diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/chroot-installation.sh | 6 | ||||
-rwxr-xr-x | bin/chroot-run.sh | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bin/chroot-installation.sh b/bin/chroot-installation.sh index b53d5177..28ac3dd3 100755 --- a/bin/chroot-installation.sh +++ b/bin/chroot-installation.sh @@ -58,6 +58,7 @@ prepare_install_packages() { cat >> $CTMPFILE <<-EOF $SCRIPT_HEADER apt-get -y install $@ +apt-get clean EOF } @@ -65,9 +66,11 @@ prepare_install_build_depends() { cat >> $CTMPFILE <<-EOF $SCRIPT_HEADER apt-get -y install build-essential +apt-get clean EOF for PACKAGE in $@ ; do echo apt-get -y build-dep $PACKAGE >> $CTMPFILE + echo apt-get clean >> $CTMPFILE done } @@ -77,8 +80,11 @@ echo "deb $MIRROR $1 main contrib non-free" >> /etc/apt/sources.list $SCRIPT_HEADER apt-get update apt-get -y upgrade +apt-get clean apt-get -yf dist-upgrade +apt-get clean apt-get -yf dist-upgrade +apt-get clean apt-get -y autoremove EOF } diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh index a1388c6f..18f14a2a 100755 --- a/bin/chroot-run.sh +++ b/bin/chroot-run.sh @@ -26,6 +26,7 @@ fi if [ "$1" == "minimal" ] ; then MINIMAL=yes + BOOTSTRAP_OPTIONS=--variant=minbase shift fi @@ -47,7 +48,7 @@ bootstrap() { echo force-unsafe-io > "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io" echo "Bootstraping $DISTRO into $CHROOT_TARGET now." - if ! sudo debootstrap $DISTRO $CHROOT_TARGET $MIRROR; then + if ! sudo debootstrap $BOOTSTRAP_OPTIONS $DISTRO $CHROOT_TARGET $MIRROR; then SLEEPTIME=1800 echo "debootstrap failed, slowing down, sleeping $SLEEPTIME now..." sleep $SLEEPTIME |