#!/bin/bash
#
# Erik Troan <ewt@redhat.com> 
#
# Copyright 1998 Red Hat Software
#
# This software may be freely redistributed under the terms of the GNU
# public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

while [ $# -gt 0 ]; do
    case $1 in
	--arch)
	    shift
	    ARCH=$1
	    ;;

	--version)
	    shift
	    VERSION=$1
	    ;;

	*)
	    break
	    ;;
    esac

    shift
done

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 "LTS 3.0.1 DISC2" \
	-V "Fermi Linux LTS 3.0.1" \
	-R -l -v -J \
	-x ./lost+found \
	-o $DEST \
	. 
