Added dvdname to 2 pass logfile to enable multiple instances of rip_dvd to run concur...
authorAlan J. Pippin <ajp@pippins.net>
Tue, 19 May 2009 23:02:26 +0000 (17:02 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Tue, 19 May 2009 23:02:26 +0000 (17:02 -0600)
Added safedvdname declaration that removes special characters from the dvdname for 2 pass logfile name

rip_dvd

diff --git a/rip_dvd b/rip_dvd
index a97a343fb8ba454554d5b85aa61176edd059cbe9..bd4442a5248d841fd0b804eaab59ca5c8adab1a8 100755 (executable)
--- a/rip_dvd
+++ b/rip_dvd
@@ -239,9 +239,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`