From: Carl Baldwin Date: Fri, 12 Feb 2010 23:57:08 +0000 (-0700) Subject: Try to find the rip_dvd script automatically. X-Git-Tag: 2_3~4 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/static/images/%3C?a=commitdiff_plain;h=fee74246afcd6c4db82dc6e55f4358131ece33ef;p=rip_dvd%2F.git Try to find the rip_dvd script automatically. --- diff --git a/rip_dvd.conf.dist b/rip_dvd.conf.dist index 6f6b80f..74e6522 100644 --- a/rip_dvd.conf.dist +++ b/rip_dvd.conf.dist @@ -6,8 +6,9 @@ # NOTE: You can override ANY of the global variables listed in the top of rip_dvd here ########################################################################################### -# specify the path to the rip_dvd script -ripcmd="/myth/video/bin/rip_dvd" +# specify the path to the rip_dvd script (no need to do this if rip_dvd is in +# the same directory as the rip_dvd.wrap script (which is likely). +# ripcmd="/myth/video/bin/rip_dvd" # Specify the device path to the DVD drive dev=/dev/dvd diff --git a/rip_dvd.wrap b/rip_dvd.wrap index fdfee25..e9e8544 100755 --- a/rip_dvd.wrap +++ b/rip_dvd.wrap @@ -16,6 +16,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)