Skip to content

Commit

Permalink
Add 'homebrew support' (fix #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 27, 2015
1 parent 001d1f3 commit 22e487a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions contrib/homebrew/gotty-client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require "language/go"

class GottyClient < Formula
desc "gotty-client: GoTTY client for your terminal"
homepage "https://github.com/moul/gotty-client"
url "https://github.com/moul/gotty-client/archive/v1.0.1.tar.gz"
sha256 "b74a2501218863b3853dc871f53dab1893357dfcd395be853c0f36b3d427928c"

head "https://github.com/moul/gotty-client.git"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
ENV["CGO_ENABLED"] = "0"
ENV.prepend_create_path "PATH", buildpath/"bin"

mkdir_p buildpath/"src/github.com/moul"
ln_s buildpath, buildpath/"src/github.com/moul/gotty-client"
Language::Go.stage_deps resources, buildpath/"src"

# FIXME: update version
system "go", "build", "-o", "gotty-client", "./cmd/gotty-client/"
bin.install "gotty-client"

# FIXME: add autocompletion
end

test do
# FIXME: add test
#output = shell_output(bin/"gotty-client --version")
#assert output.include? "gotty-client version XXX"
end
end

0 comments on commit 22e487a

Please sign in to comment.