. $MYPWD/../locations.include
TREE=$1
if [ ! -d $1 ]; then
    echo "First parameter must be the directory to place at the root of the CD"
    exit 1
fi

DEST=$2
if [ -z "$2" ]; then
    echo "Second parameter must be the name of the final iso image."
    exit 1
fi

echo "Creating $2 from $1..."

cd $TREE

mkisofs \
	-A "$VERSION DISC3" \
	-V "$VERSION" \
	-R -l -v -J \
	-o $DEST \
	-x ./lost+found \
	-m *RedHat* \
        -graft-points \
	 . \
      misc/=$RELEASEDIR/$ARCH/misc \
      notsupported/=$RELEASEDIR/$ARCH/notsupported/RPMS \
      dosutils/=$RELEASEDIR/$ARCH/dosutils \
      images/=$RELEASEDIR/$ARCH/images/$DEFAULT 
