Initial commit
This commit is contained in:
15
bin/link_config
Normal file
15
bin/link_config
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'pathname'
|
||||
require 'fileutils'
|
||||
|
||||
src_root = Pathname.new('/opt/barong/config')
|
||||
dest_root = Pathname.new(File.expand_path('../../config', __FILE__))
|
||||
|
||||
Dir[src_root.join('**/*.yml').to_s].each do |f|
|
||||
dest = dest_root.join(Pathname.new(f).relative_path_from(src_root))
|
||||
Kernel.puts "Link #{f} -> #{dest}"
|
||||
FileUtils.ln_s(f, dest, force: true)
|
||||
end
|
||||
Reference in New Issue
Block a user