-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
executable file
·34 lines (25 loc) · 931 Bytes
/
Vagrantfile
File metadata and controls
executable file
·34 lines (25 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'json'
require 'yaml'
Encoding.default_external = 'UTF-8'
VAGRANTFILE_API_VERSION = "2"
confDir = $confDir ||= File.expand_path("vendor/ytake/gardening-hhvm", File.dirname(__FILE__))
GardeningYamlPath = "./vagrant.yaml"
GardeningJsonPath = "./vagrant.json"
appendScriptPath = "./append.sh"
aliasesPath = "./aliases"
require File.expand_path(confDir + '/scripts/builder.rb')
Vagrant.configure(2) do |config|
if File.exists? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
end
if File.exists? GardeningYamlPath then
Builder.configure(config, YAML::load(File.read(GardeningYamlPath)))
elsif File.exists? GardeningJsonPath then
Builder.configure(config, JSON.parse(File.read(GardeningJsonPath)))
end
if File.exists? appendScriptPath then
config.vm.provision "shell", path: appendScriptPath
end
end