Using environment variable DUP_DIR to point us to the location of the yml files.
This commit is contained in:
parent
ba4f1e057a
commit
12c16cf9c3
9
dup.rb
9
dup.rb
@ -185,7 +185,14 @@ if container==nil || container==""
|
|||||||
raise "No container given."
|
raise "No container given."
|
||||||
end
|
end
|
||||||
|
|
||||||
file = "%s/%s.yml" % [ "/data/fabian/projects/dup", container ]
|
if ENV['DUP_DIR']
|
||||||
|
base_dir = ENV['DUP_DIR']
|
||||||
|
else
|
||||||
|
base_dir = File.join(Dir.home, ".dup")
|
||||||
|
puts "Environment variable DUP_DIR is not set. Looking for .yml files in #{base_dir}"
|
||||||
|
end
|
||||||
|
|
||||||
|
file = "%s/%s.yml" % [ base_dir, container ]
|
||||||
|
|
||||||
if action == :create
|
if action == :create
|
||||||
action_create(container, file)
|
action_create(container, file)
|
||||||
|
Loading…
Reference in New Issue
Block a user