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

e71c94
#!/bin/bash -x
e71c94
e71c94
set -e
e71c94
e71c94
arch=amd64
e71c94
suite=wheezy
e71c94
chroot_dir="/var/chroot/$suite"
5df1de
apt_mirror="http://archive.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
9a8dee
setarch x86_64 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
5df1de
#deb $apt_mirror $suite-updates main
5df1de
#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
9a8dee
genisoimage -quiet -R -o "$SCRIPT_DIR/debian-$suite-$arch.iso" "$chroot_dir"
a1747c
e71c94
rm -rf $chroot_dir