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

OPTS="$(ls g2v_base*.tar.7z g2v_opt*.tar.7z)"

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 -iso-level 4 -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/COPYING $ISOLX_DIR/README $ISOLX_DIR/HISTORY
	
