Skip to content

Commit

Permalink
homebrew recipe to install govc from https://github.com/vmware/govmomi
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Jul 11, 2018
1 parent 8556c15 commit 5b83dd7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions govc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require "FileUtils"

class Govc < Formula
homepage "https://github.com/vmware/govmomi"

v = "v0.18.0" # CI Managed
url "https://github.com/vmware/govmomi/releases/download/#{v}/govc_darwin_amd64.gz"
version v
sha256 "58d522f32e79c509f4b42edb7d0e80ef0bade5592520df06b93c8f91731e780a" # CI Managed

def gunzip(filename)
command = "gunzip --force #{filename}"
success = system(command)

success && $?.exitstatus == 0
end

def install
FileUtils.mv("govc_darwin_amd64", "govc")
bin.install "govc"
end

test do
system "#{bin}/govc", "version"
end
end

0 comments on commit 5b83dd7

Please sign in to comment.