3 ##############################################
4 # COMMAND LINE PROCESSING
6 # get the dvdtype from the command line
9 # remove the dvdtype from the args, and interpret the rest
10 # of the args to be passed directly to the rip_dvd script.
13 ##############################################
14 if [ -z "$dvdtype" ]; then
15 echo "-E- $0 <dvdtype>' is a required option"
19 ##############################################################################
20 # Local Machine Settings:
21 # Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist)
22 # and the local conf file created by each local machine (rip_dvd.conf)
23 # Copy the rip_dvd.conf.dist file to rip_dvd.conf and edit the later.
24 # This will allow you to override all the default values to meet your needs
25 # in a way that won't get clobbered when you pull updates from my GIT repo.
26 ##############################################################################
27 config="${0%/*}/rip_dvd.conf"
28 [ -e "${config}.dist" ] && . ${config}.dist
29 [ -e "${config}" ] && . ${config}
31 ##############################################
32 # get the name of the DVD from the DVD disk
33 dvdname=`volname $dev | awk '{ print $1 }'`
34 dvdname=${dvdname%.} # remove trailing '.' character
36 ##############################################
37 # Find out what type of DVD we are ripping
38 # And set our destination directory appropriately
40 # - netflix = DVD ripped as an entire ISO image
41 # since these are only kept around until we watch them,
42 # there is no need to do anything less than full iso.
43 # - collection = Only DVD main feature is ripped
44 # - childrens = Only DVD main feature is ripped
45 # - church = Only DVD main feature is ripped
47 if [ "$dvdtype" == "netflix" ]; then
48 echo "-> Ripping Netflix DVD"
49 dest=/myth/video/DVDs/Netflix
51 elif [ "$dvdtype" == "collection" ]; then
52 echo "-> Ripping Personal Collection DVD"
53 dest=/myth/video/DVDs/Collection
55 elif [ "$dvdtype" == "childrens" ]; then
56 echo "-> Ripping Children's DVD"
57 dest=/myth/video/DVDs/Childrens
59 elif [ "$dvdtype" == "church" ]; then
60 echo "-> Ripping Church DVD"
61 dest=/myth/video/DVDs/Church
64 echo '-E- Must specify dvdtype as "netflix" or "collection" or "childrens" or "church"'
68 ##############################################
69 # Display progress window
71 # Pop up an xterm window and run the script inside of it
72 echo "xterm -T \"Ripping->$dvdname\" -geometry 72x15+20+10 -bg black -fg white -e \"/bin/bash\" -c \"$ripcmd -d $dest $rip_opts\" &"
73 xterm -T "Ripping->$dvdname" -geometry 72x15+20+10 -bg black -fg white -e "/bin/bash" -c "$ripcmd -d $dest $rip_opts" &
75 ##############################################
76 # OR display the script output directly in the terminal it's called from
77 #$ripcmd -d $dest $rip_opts
79 ##############################################