29 lines
778 B
Ruby
29 lines
778 B
Ruby
|
class MinioMc < Formula
|
||
|
desc "ls, cp, mkdir, diff and rsync for filesystems and object storage"
|
||
|
homepage "https://github.com/minio/mc"
|
||
|
url "https://github.com/minio/mc/archive/RELEASE.2016-07-13T21-46-05Z.tar.gz"
|
||
|
version "20160713214605"
|
||
|
sha256 "611444a66ea3d2cc8fbb821147bcd3995c1956ef2aa9d62cd35f6d07f3f972cf"
|
||
|
head "https://github.com/minio/mc.git"
|
||
|
|
||
|
depends_on "go" => :build
|
||
|
|
||
|
conflicts_with "midnight-commander", :because => "Both install a `mc` binary"
|
||
|
|
||
|
def install
|
||
|
ENV["GOPATH"] = buildpath
|
||
|
|
||
|
clipath = buildpath/"src/github.com/minio/mc"
|
||
|
clipath.install Dir["*"]
|
||
|
|
||
|
cd clipath do
|
||
|
system "go", "build", "-o", bin/"mc"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
system bin/"mc", "mb", testpath/"test"
|
||
|
assert File.exist?(testpath/"test")
|
||
|
end
|
||
|
end
|