while test $# -gt 0; do DO_SHIFT=: case "$1" in "-files" ) shift get_listargs "$@" for f in ${!ARGS_ARRAY[@]}; do FILES[f]="$(abspath "${ARGS_ARRAY[f]}")" done ;; "-titleset" ) shift unset x ARGS_ARRAY # Hackish list-parsing while test $# -gt 0 && test "$1" != "-end-titleset"; do ARGS_ARRAY[x++]=\"$1\" shift done # Do not skip past the next argument if test $# -gt 0 && test x"${1:0:1}" = x"-";then DO_SHIFT=false fi TITLESET_OPTS[y++]="${ARGS_ARRAY[@]}" DO_TITLESETS=: ;; . . . function titleset_mode() # call todisc recursively in order to allow titlesets { ! $GROUPING && mk_workdir # cd "$WORK_DIR" DVDAUTHOR_XML=$BASEDIR/dvdauthor.xml # make dvdauthor.xml ( cat < $(for ((i=1; i<=${#TITLESET_OPTS[@]}; i++)); do echo " "; done) EOF ) |sed '/^ *$/d' >> "$DVDAUTHOR_XML" yecho "Making a VMGM menu with the following command" vmgm_menu_cmd=(todisc -out $OUT_PREFIX -basedir "$REAL_WORK_DIR" \ -menu-only -textmenu -keepfiles "${VMGM_OPTS[@]}") # vmgm_menu_cmd=(makemenu "${VMGM_TITLES[@]}" -out VMGM -button play -align middle $NO_ASK $VMGM_MENU_OPTS) echo VMGM_ONLY is $VMGM_ONLY yecho This is the "${vmgm_menu_cmd[@]}" "${vmgm_menu_cmd[@]}" for tset in ${!TITLESET_OPTS[@]}; do eval todisc -titleset-mode -keepfiles -basedir "$REAL_WORK_DIR" \ -tset_num $tset $NO_ASK -out $OUT_PREFIX ${TITLESET_OPTS[tset]} done echo -e "" >> "$DVDAUTHOR_XML" yecho "Running dvdauthor to create final DVD structure" dvdauthor -x "$DVDAUTHOR_XML" 2>&1 | tee -a "$LOG_FILE" if [[ ${PIPESTATUS[0]} -ne 0 ]]; then runtime_error "There was a problem creating the DVD structure" fi yecho "Your new DVD should be in $OUT_DIR" cleanup } . . . if $DO_TITLESETS; then titleset_mode exit fi