mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-22 19:13:14 +00:00
11 lines
305 B
Ruby
11 lines
305 B
Ruby
|
#!/usr/bin/env ruby
|
||
|
|
||
|
def read_config
|
||
|
IO.readlines("#{File.dirname(__FILE__)}/conf.sh").
|
||
|
map { |line| line.chomp.gsub(%r{\$HOME|\$\{HOME\}}, ENV['HOME']) }.
|
||
|
reject { |line| %r{^#|^\s*$}.match line }.
|
||
|
select { |line| %r{=}.match line }.
|
||
|
map { |line| line.split %r{=} }.
|
||
|
to_h
|
||
|
end
|