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

e71c94
#!/bin/bash -x
e71c94
e71c94
set -e
e71c94
e71c94
arch=amd64
e71c94
suite=wheezy
e71c94
chroot_dir="/var/chroot/$suite"
a1747c
apt_mirror="http://ftp.de.debian.org/debian/"
e71c94
e71c94
SCRIPT_DIR=$(cd `dirname "$0"`; pwd)
e71c94
BASE_DIR=`dirname "$SCRIPT_DIR"`
8fa589
BASE_DIR=`dirname "$BASE_DIR"`
e71c94
CONFIG_FILE="$BASE_DIR/config.sh"
e71c94
if [ -f $CONFIG_FILE ]; then
e71c94
	source $CONFIG_FILE
e71c94
fi
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
pushd $chroot_dir
a1747c
zip "$SCRIPT_DIR/debian-$suite-$arch.zip" -qyr0 . || true # zip cannot process some files from /dev
a1747c
popd
a1747c
e71c94
rm -rf $chroot_dir