Skip to content

Commit

Permalink
Merge pull request beetboxvm#307 from thom8/vfile_fix
Browse files Browse the repository at this point in the history
Copy stub to project root.
  • Loading branch information
Decipher authored Aug 18, 2016
2 parents 1d53536 + 9ad5092 commit 0b3715f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions provisioning/packer/includes/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ if cwd != nil && File.exist?("#{cwd}/#{vagrantfile}")
r_vagrantfile = ENV['BEET_VAGRANTFILE'] || "https://raw.githubusercontent.com/beetboxvm/beetbox/master/.beetbox/Vagrantfile"
b_vagrantfile_stub = "#{__dir__}/Vagrantfile.stub"
b_vagrantfile = "#{__dir__}/Vagrantfile.box"
l_vagrantfile = "#{ENV['BEET_ROOT_DIR']}/Vagrantfile"
l_vagrantfile_stub = "#{ENV['BEET_ROOT_DIR']}/Vagrantfile"
l_vagrantfile = "#{ENV['BEET_CONFIG_DIR']}/Vagrantfile"

# Update box Vagrantfile.
require 'open-uri'
Expand All @@ -63,7 +64,7 @@ if cwd != nil && File.exist?("#{cwd}/#{vagrantfile}")
end

# Copy box Vagrantfile stub to project.
f = open(l_vagrantfile, 'w+') << open(b_vagrantfile).read
f = open(l_vagrantfile_stub, 'w+') << open(b_vagrantfile_stub).read
f.close

puts "beetbox successfullly initialised."
Expand Down

0 comments on commit 0b3715f

Please sign in to comment.