diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-17 17:33:32 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-17 17:33:32 -0400 |
commit | 4f175a22cf726bfa09652d8d9ca6374785561348 (patch) | |
tree | 5dfe499deaf87e5e22323e8ad1d543d93403f81b /scripts | |
parent | cd95339699971207f22b6d4fc8524fcdb592409e (diff) |
allow overriding the yamldir from the environment
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/common.rb.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/common.rb.in b/scripts/common.rb.in index d81fa0c..7c457b8 100644 --- a/scripts/common.rb.in +++ b/scripts/common.rb.in @@ -17,7 +17,13 @@ require 'yaml' def cfg - @cfg ||= YAML::load(open("@conf_file@")) + if @cfg.nil? + @cfg = YAML::load(open("@conf_file@")) + if ENV['PARABOLA_HACKERS_YAMLDIR'] + @cfg["yamldir"] = ENV['PARABOLA_HACKERS_YAMLDIR'] + end + end + return @cfg end def load_user_yaml(filename) |