X-Git-Url: https://pwan.org/git/?p=vagrant-dotfiles.git;a=blobdiff_plain;f=lib%2Fcopy_my_conf%2Fgit.rb;fp=lib%2Fcopy_my_conf%2Fgit.rb;h=eea3b866db747fdd102403482d85e7f23dca7f83;hp=0000000000000000000000000000000000000000;hb=08b150e7415fcdaca5277bee264dda740369063f;hpb=d0fd407a03a85403a28f0d14d9f36cc264d07282 diff --git a/lib/copy_my_conf/git.rb b/lib/copy_my_conf/git.rb new file mode 100644 index 0000000..eea3b86 --- /dev/null +++ b/lib/copy_my_conf/git.rb @@ -0,0 +1,18 @@ +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 + + def provision channel, user_home, tmp_root + puts "Copying your gitconfig" + channel.execute("cp #{tmp_root}/git/.gitconfig #{user_home}") + end + end + end + end +end \ No newline at end of file