forked from ccosby/homebrew-ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuck.rb
34 lines (26 loc) · 723 Bytes
/
buck.rb
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
require 'formula'
class Buck < Formula
homepage 'http://facebook.github.io/buck/'
url 'https://github.com/facebook/buck.git', :tag => 'master'
version 'master'
def install
# Copy the downloaded .git to prefix
cp_r cached_download/'.git', prefix
Dir.chdir prefix do
# Reset and checkout the code to cleanup the tree
system 'git', 'reset', '--hard'
system 'git', 'checkout'
# Build buck with ant
system "ant"
end
#(prefix+'.git').mkdir unless File.exists?((prefix+'.git'))
#prefix.install cached_download/'.git'
# Dir.chdir prefix do
# puts "pwd: #{Dir.getwd}"
# system "ant"
# end
end
test do
system "buck", "--version"
end
end