Upped the revision
[rip_dvd/.git] / rip_dvd.wrap
index fdfee25d0fac2aa0407d57251f9ed82cbc2de49b..76fcb3ccd62883d2b6f136cf562beaa69939c350 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/bash
+# The purpose of this script is to encapsulate the calls
+# made to the rip_dvd script. This is done to help distribute
+# the resulting ripped files to the proper folders. This
+# script is called from the mythtv menus for example with a
+# smaller set of options.
 
 ##############################################
 # COMMAND LINE PROCESSING
@@ -16,6 +21,18 @@ if [ -z "$dvdtype" ]; then
   usage
 fi
 
+mydir=$(cd $(dirname $0) && pwd)
+if [ -z "$ripcmd" ]
+then
+  if [ -x "$mydir/rip_dvd" ]
+  then
+    ripcmd="$mydir/rip_dvd"
+  else
+    echo >&2 "Cannot find your rip_dvd command!"
+    exit 1
+  fi
+fi
+
 ##############################################################################
 # Local Machine Settings:
 # Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist)