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

10e43d
#!/bin/bash -x
10e43d
10e43d
set -e
10e43d
10e43d
arch=i386
10e43d
suite=wheezy
a1747c
chrooter_image="morevnaproject/debian-$arch:$suite"
10e43d
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
9a8dee
IMAGE_FILE="$SCRIPT_DIR/debian-$suite-$arch.iso"
8fa589
if [ ! -f "$IMAGE_FILE" ]; then
9a8dee
    "$SCRIPT_DIR/build-iso.sh"
8fa589
fi
8fa589
e71c94
8fa589
if [ -f "$IMAGE_FILE" ]; then
a1747c
    chrooter import - $chrooter_image < "$IMAGE_FILE"
10e43d
else
8fa589
    echo "File $IMAGE_FILE not found"
9a8dee
    echo "You may try to create it by command $SCRIPT_DIR/build-iso.sh"
10e43d
fi