#!/bin/sh
set -e

# check environment variables are set
if [ -z "$CC03_ROOT" ]; then
    echo "Error: CC03_ROOT not set, nothing done"
    exit 1
fi
${CC03_ROOT}/bin/cc03-check

# tag the master filesystem with a version
${CC03_ROOT}/bin/cc03-tag

# make the inner filesystem
if ! test -f $CC03_PART/knx/master/KNOPPIX/KNOPPIX; then
    echo "Warning: inner filesystem not made, doing it now"
    ${CC03_ROOT}/bin/cc03-make-inner
fi

# make the outer filesystem
${CC03_ROOT}/bin/cc03-make-outer

# burn it to CD
${CC03_ROOT}/bin/cc03-burn

echo "cc03-make-another: completed"
