Blame env/debian-7-32bit/build-zip.sh

10e43d
#!/bin/bash -x
10e43d
10e43d
set -e
10e43d
10e43d
arch=i386
10e43d
suite=wheezy
10e43d
chroot_dir="/var/chroot/$suite"
a1747c
apt_mirror="http://ftp.de.debian.org/debian/"
10e43d
8fa589
SCRIPT_DIR=$(cd `dirname "$0"`; pwd)
8fa589
BASE_DIR=`dirname "$SCRIPT_DIR"`
8fa589
BASE_DIR=`dirname "$BASE_DIR"`
8fa589
CONFIG_FILE="$BASE_DIR/config.sh"
8fa589
if [ -f $CONFIG_FILE ]; then
8fa589
	source $CONFIG_FILE
8fa589
fi
8fa589
10e43d
export DEBIAN_FRONTEND=noninteractive
10e43d
debootstrap --arch $arch $suite $chroot_dir $apt_mirror
10e43d
10e43d
cat <<eof> $chroot_dir/etc/apt/sources.list</eof>
10e43d
deb $apt_mirror $suite main
10e43d
deb $apt_mirror $suite-updates main
10e43d
deb http://security.debian.org/ $suite/updates main
10e43d
EOF
10e43d
10e43d
chroot $chroot_dir apt-get update
10e43d
chroot $chroot_dir apt-get upgrade -y
10e43d
chroot $chroot_dir apt-get autoclean
10e43d
chroot $chroot_dir apt-get clean
10e43d
chroot $chroot_dir apt-get autoremove
10e43d
a1747c
pushd $chroot_dir
a1747c
zip "$SCRIPT_DIR/debian-$suite-$arch.zip" -qyr0 . || true # zip cannot process some files from /dev
a1747c
popd
a1747c
10e43d
rm -rf $chroot_dir