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

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