#!/bin/sh
#
# Copyright (C) 2006-2009 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

date=`date +%Y-%m-%d`

dir="FAUmachine-${date}"
iso="FAUmachine-${date}.iso"

if [ -d ${dir} ] ; then
	echo "${dir}: exists already" 1>&2
	exit 1
fi
if [ -f ${iso} ] ; then
	echo "${iso}: exists already" 1>&2
	exit 1
fi

mkdir ${dir}
cd ${dir}

#
# copy FAUmachine source repository
#
cp -a /proj/FAUmachine FAUmachine.repository

#
# copy original Linux, Lilo and external sources
#
cp -a /src/FAUmachine/Bios .

cd ..

#
# generate iso image
#
# mkisofs -r -T -v -o ${iso} ${dir}
genisoimage -r -T -v -o ${iso} ${dir}

rm -rf ${dir}
