#!/bin/sh
OPTS=""
ISOLX_DIR="isolinux"
TARGET="vdr.iso"

OPTS="$(ls g2v_base*.tar.lzma g2v_add*.tar.lzma g2v_opt*.tar.lzma)"

if [ "$1" != "" ] ; then
   TARGET=$1
fi 

if [ -d doc ] ; then
   OPTS="$OPTS /doc/=doc"
fi 

if [ -d g2v_inst ] ; then
   OPTS="$OPTS /g2v_inst/=g2v_inst"
fi 
   
if [ -f $TARGET ] ; then
   rm -v $TARGET
fi

mkisofs -o $TARGET -allow-leading-dots -graft-points -l -J -r -p ACTIVY -publisher ACTIVY -V ACTIVY \
        -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
        $OPTS /isolinux/=$ISOLX_DIR/ setup.sh autorun $ISOLX_DIR/README $ISOLX_DIR/HISTORY
	
