mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
11 lines
305 B
Ruby
Executable File
11 lines
305 B
Ruby
Executable File
#!/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
|