Skip to content

Commit 673c224

Browse files
committed
We should probably create directories to mirror to them.
1 parent 3d73517 commit 673c224

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Vagrantfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Vagrant.configure("2") do |config|
1313
config.vm.provision :chef_solo do |chef|
1414
chef.json = {
1515
'source_mirror' => {
16-
'data_dir' => '/home/vagrant/source',
1716
'user' => 'vagrant'
1817
}
1918
}

recipes/default.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ def mirror_repo(repo_url, local_path)
2020
end
2121
end
2222

23+
directory node.source_mirror.data_dir do
24+
owner node.source_mirror.user
25+
group node.source_mirror.user
26+
mode "0755"
27+
recursive true
28+
end
29+
2330
node.source_mirror.repos.each do | user, repo |
31+
directory "#{node.source_mirror.data_dir}/#{user}" do
32+
owner node.source_mirror.user
33+
group node.source_mirror.user
34+
mode "0755"
35+
end
36+
2437
if repo.is_a?(Array)
2538
repo.each{ |r|
2639
mirror_repo("https://github.com/#{user}/#{r}.git", "#{node.source_mirror.data_dir}/#{user}/#{r}.git")

0 commit comments

Comments
 (0)