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

10e43d
#!/bin/bash -x
10e43d
10e43d
set -e
10e43d
10e43d
arch=i386
10e43d
suite=wheezy
2ea947
docker_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
8fa589
IMAGE_FILE="$SCRIPT_DIR/debian-$suite-$arch.tar.gz"
8fa589
if [ ! -f "$IMAGE_FILE" ]; then
8fa589
    "$SCRIPT_DIR/build-tgz.sh"
8fa589
fi
8fa589
e71c94
8fa589
if [ -f "$IMAGE_FILE" ]; then
8fa589
    docker import - $docker_image < "$IMAGE_FILE"
10e43d
else
8fa589
    echo "File $IMAGE_FILE not found"
8fa589
    echo "You may try to create it by command $SCRIPT_DIR/build-tgz.sh"
10e43d
fi