optionally load a custom configuration script.
This commit is contained in:
parent
6c44db6e65
commit
39d2b456a7
|
@ -11,6 +11,7 @@ module Qwandry
|
|||
def initialize
|
||||
@repositories = Hash.new{|h,k| h[k] = []}
|
||||
configure_repositories!
|
||||
custom_configuration!
|
||||
end
|
||||
|
||||
# Adds a repository path to Qwandry's Launcher.
|
||||
|
@ -62,5 +63,12 @@ module Qwandry
|
|||
end
|
||||
end
|
||||
|
||||
def custom_configuration!
|
||||
custom_path = ENV['HOME'] && ENV['HOME'] + '/.qwandry/init.rb'
|
||||
if File.exist? custom_path
|
||||
eval IO.read(custom_path)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue