Created
August 21, 2015 08:04
-
-
Save cooperaj/790c2fd77fa33342e968 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'yaml' | |
VAGRANTFILE_API_VERSION = "2" | |
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__)) | |
homesteadYamlPath = File.dirname(__FILE__) + "/Homestead.yaml" | |
afterScriptPath = "after.sh" | |
aliasesPath = "aliases" | |
require File.expand_path(confDir + '/scripts/homestead.rb') | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
if File.exists? aliasesPath then | |
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases" | |
end | |
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath))) | |
if File.exists? afterScriptPath then | |
config.vm.provision "shell", path: afterScriptPath | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment