mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-27 05:14:47 +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
|