#! /bin/sh -e
. /scripts/common.sh
log "Scanning for DVD title"
title=$(dvdbackup -I | awk -F \" '/DVD with title/ {print $2}')
log "DVD Title: $title"
cat <<EOD >env
mtype=dvd
title="$title"
EOD
dvdbackup -p -M -n DVD