Guest User

Untitled

a guest
Jul 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. # Rakefile allowing a two-phase work with Vagrant:
  2. # - first bootstrap from the lucid32 box but applies what's missing
  3. # - then regular cookbook development
  4.  
  5. def system!(cmd)
  6. puts "Running #{cmd}"
  7. raise "Error running #{cmd}!" unless system(cmd)
  8. end
  9.  
  10. task :bootstrap do
  11. system!("vagrant destroy")
  12.  
  13. ENV['HACKER_BOOTSTRAP'] = '1'
  14. system!("vagrant up")
  15. ENV['HACKER_BOOTSTRAP'] = nil
  16.  
  17. system!("vagrant package")
  18. system("vagrant box remove hackerbooks")
  19. system!("vagrant box add hackerbooks package.box")
  20. system!("rm package.box")
  21.  
  22. system!("vagrant destroy")
  23. system!("vagrant up")
  24. end
Add Comment
Please, Sign In to add comment