Blame chrooter/build-initial-system.sh

e71c94
#!/bin/bash -x
e71c94
e71c94
set -e
e71c94
e71c94
arch=i386
e71c94
suite=wheezy
e71c94
chroot_dir="/var/chroot/$suite"
e71c94
apt_mirror="ftp://ftp.debian.org/debian/"
e71c94
e71c94
export DEBIAN_FRONTEND=noninteractive
e71c94
debootstrap --arch $arch $suite $chroot_dir $apt_mirror
e71c94
e71c94
cat <<eof> $chroot_dir/etc/apt/sources.list</eof>
e71c94
deb $apt_mirror $suite main
e71c94
deb $apt_mirror $suite-updates main
e71c94
deb http://security.debian.org/ $suite/updates main
e71c94
EOF
e71c94
e71c94
chroot $chroot_dir apt-get update
e71c94
chroot $chroot_dir apt-get upgrade -y
e71c94
chroot $chroot_dir apt-get autoclean
e71c94
chroot $chroot_dir apt-get clean
e71c94
chroot $chroot_dir apt-get autoremove
e71c94
a1747c
olddir=`pwd`
a1747c
pushd $chroot_dir
a1747c
zip "$olddir/debian-$suite-$arch.zip" -qyr0 . || true # zip cannot process some files from /dev
a1747c
popd
a1747c
e71c94
rm -rf $chroot_dir