+ echo "-E- You must supply a full path to a valid DVD folder with this option"
+ exit 1
+ fi
+ fi
+ # check to see if dvdname is a full path to an MPG2 (VOB) file
+ # if it is, set dvdname and vobfile appropriately
+ if [ -f "$dvdname" ]; then
+ vobfile="$dvdname"
+ dvdname=`basename "$dvdname"`
+ file "$vobfile" | grep -q "MPEG"
+ if [ $? == 0 ]; then
+ # It is a valid MPEG2 file, now strip the extension off our dvdname
+ dvdname=${dvdname%.[^.]*}
+ else
+ echo "-E- Unsupported file type: $vobfile"
+ exit 1