X-Git-Url: https://pwan.org/git/?p=vagrant-dotfiles.git;a=blobdiff_plain;f=lib%2Fcopy_my_conf%2Fgit.rb;h=4ee5240563b5f4ec66db5056d9b8270f009ced01;hp=eea3b866db747fdd102403482d85e7f23dca7f83;hb=7adf63265cfc7d78bf36412e0ac0f480dd689678;hpb=2254852606b5104c60f643724a827701ae0c9c81 diff --git a/lib/copy_my_conf/git.rb b/lib/copy_my_conf/git.rb index eea3b86..4ee5240 100644 --- a/lib/copy_my_conf/git.rb +++ b/lib/copy_my_conf/git.rb @@ -1,18 +1,14 @@ -module Vagrant - module Provisioners - class CopyMyConf < Base - class Git - def prepare vm, tmp_root - `mkdir -p #{tmp_root}/git` - `cp ~/.gitconfig #{tmp_root}/git/` - vm.share_folder("git", "#{tmp_root}/git/", "#{tmp_root}/git") - end +module CopyMyConf + class Git + def prepare vm, tmp_root + `mkdir -p #{tmp_root}/git` + `cp ~/.gitconfig #{tmp_root}/git/` + vm.synced_folder("#{tmp_root}/git/", "#{tmp_root}/git", :id => "git") + end - def provision channel, user_home, tmp_root - puts "Copying your gitconfig" - channel.execute("cp #{tmp_root}/git/.gitconfig #{user_home}") - end - end + def provision channel, user_home, tmp_root + puts "Copying your gitconfig" + channel.execute("cp #{tmp_root}/git/.gitconfig #{user_home}") end end -end \ No newline at end of file +end