File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
# -*- mode: ruby -*-
2
2
# vi: set ft=ruby :
3
3
4
+ clone_crystal_from_vagrant = lambda do |config |
5
+ config . vm . provision :shell , privileged : false , inline : %(
6
+ git clone /vagrant crystal
7
+ )
8
+ end
9
+
4
10
Vagrant . configure ( "2" ) do |config |
5
11
%w( precise trusty xenial ) . product ( [ 32 , 64 ] ) . each do |dist , bits |
6
12
box_name = "#{ dist } #{ bits } "
@@ -15,6 +21,8 @@ Vagrant.configure("2") do |config|
15
21
echo 'export LIBRARY_PATH="/opt/crystal/embedded/lib"' > /etc/profile.d/crystal.sh
16
22
echo 'export PATH="$PATH:/opt/llvm-3.5.0-1/bin"' >> /etc/profile.d/crystal.sh
17
23
)
24
+
25
+ clone_crystal_from_vagrant . call ( c )
18
26
end
19
27
end
20
28
@@ -33,14 +41,12 @@ Vagrant.configure("2") do |config|
33
41
c . vm . provision :shell , inline : %(
34
42
pkg install -y git gmake pkgconf pcre libunwind clang36 libyaml gmp libevent2
35
43
)
44
+
45
+ clone_crystal_from_vagrant . call ( c )
36
46
end
37
47
38
48
config . vm . provider "virtualbox" do |vb |
39
49
vb . memory = 4096
40
50
vb . cpus = 2
41
51
end
42
-
43
- config . vm . provision :shell , privileged : false , inline : %(
44
- git clone /vagrant crystal
45
- )
46
52
end
You can’t perform that action at this time.
0 commit comments