Cleaned up usage information for -n option
[rip_dvd/.git] / rip_dvd
diff --git a/rip_dvd b/rip_dvd
index a97a343fb8ba454554d5b85aa61176edd059cbe9..4d3d08acb87e0a32999bce3aa5de511a1cb8aa46 100755 (executable)
--- a/rip_dvd
+++ b/rip_dvd
@@ -114,10 +114,11 @@ function usage() {
     echo >&2 "Revision $REV"
     echo >&2 "Options:"
     echo >&2 "   -d <destdir>  Specify the destination directory to store the ripped DVD to"
-    echo >&2 "   -n <dvdname>  Specify what the name of the DVD is to process from $tmpdir"
-    echo >&2 "                 If dvdname is a full path to a DVD folder, it will be ripped as a DVD instead of $dev"
-    echo >&2 "                 If dvdname is a full path to an MPG2 file, it will be ripped as a DVD instead of $dev"
-    echo >&2 "                 This is optional. If not specified, the dvd will be pulled from $dev"
+    echo >&2 "   -n <dvdname>  Specify a path to a DVD folder or file to process:"
+    echo >&2 "                 1) If this option is not specified, the DVD will be ripped from $dev"
+    echo >&2 "                 2) If dvdname exists in $tmpdir, it will be ripped as a DVD instead of $dev"
+    echo >&2 "                 3) If dvdname is a full path to a DVD folder, it will be ripped as a DVD instead of $dev"
+    echo >&2 "                 4) If dvdname is a full path to an MPG2 file, it will be ripped as a DVD instead of $dev"
     echo >&2 "   -m            Make a mirror image of the DVD and save it as a DVD ISO file"
     echo >&2 "                 The default operation is non-mirror mode where only the main"
     echo >&2 "                 feature title will be ripped."
@@ -239,9 +240,12 @@ if [ -z "$vobfile" ]; then
   vobfile="$dest/$dvdname.VOB"
 fi
 
+# make a "safe" dvdname (remove special characters)
+safedvdname=`basename "$dvdname" | sed 's/[ !&*\\$?]/_/g'`
+
 # set up some variables to hold various logfiles
 logfile="$logdir/$dvdname.log"
-passlogfile="$tmpdir/divx2pass.log"
+passlogfile="$tmpdir/$safedvdname.log"
 ddrescuelog=`tempfile`
 dvdauthorlog=`tempfile`
 encodelog=`tempfile`