From: Alan J. Pippin Date: Fri, 22 May 2009 21:05:22 +0000 (-0600) Subject: Moved local configuration sourcing to occur after global variables are defined. X-Git-Tag: 1_0~4 X-Git-Url: http://git.pippins.net/embedvideo/.git/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/static/%7Bview%7D?a=commitdiff_plain;h=e2d5d785cc746bb0b093cbcb91a7870265cba022;p=rip_dvd%2F.git Moved local configuration sourcing to occur after global variables are defined. This will enable a user to override any of the default variables in their conf file. --- diff --git a/rip_dvd b/rip_dvd index ed395b2..754cda7 100755 --- a/rip_dvd +++ b/rip_dvd @@ -25,20 +25,8 @@ # lookup imdb info/posters for mythvideo: http://www.mythtv.org/wiki/Fill_mythvideo_metadata.pl # -############################################################################## -# Local Machine Settings: -# Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist) -# and the local conf file created by each local machine (rip_dvd.conf) -# Copy the rip_dvd.conf.dist file to rip_dvd.conf and edit the later. -# This will allow you to override all the default values to meet your needs -# in a way that won't get clobbered when you pull updates from my GIT repo. -############################################################################## -config="${0%/*}/rip_dvd.conf" -[ -e "${config}.dist" ] && . ${config}.dist -[ -e "${config}" ] && . ${config} - ############################################################################################## -# Command line processing +# Global Variables ############################################################################################## typeset cmd="$0 $*" typeset dvdname="" @@ -72,6 +60,21 @@ typeset -i invalid_feature_title=0 typeset -i feature_title_override=0 typeset -i mplayer_dumpstream_incompatibility=0 +############################################################################## +# Local Machine Settings: +# Sources both the "default" conf file tracked by GIT (rip_dvd.conf.dist) +# and the local conf file created by each local machine (rip_dvd.conf) +# Copy the rip_dvd.conf.dist file to rip_dvd.conf and edit the later. +# This will allow you to override all the default values to meet your needs +# in a way that won't get clobbered when you pull updates from my GIT repo. +############################################################################## +config="${0%/*}/rip_dvd.conf" +[ -e "${config}.dist" ] && . ${config}.dist +[ -e "${config}" ] && . ${config} + +############################################################################################## +# Command line processing +############################################################################################## while (($#)) && getopts 12mvifkxht:n:d:b:s:t:a:p:e:j: opt "$@" do case $opt in diff --git a/rip_dvd.conf.dist b/rip_dvd.conf.dist index b2a5669..da1dad6 100644 --- a/rip_dvd.conf.dist +++ b/rip_dvd.conf.dist @@ -3,6 +3,7 @@ # - rip_dvd.conf.dist = contains default values (tracked by GIT) # - rip_dvd.conf = contains localized overrides to the default values (not tracked by GIT) # should initially be created by copying the rip_dvd.conf.dist +# 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