2014-09-18 11:05:21 +00:00
|
|
|
class Keybase < Formula
|
|
|
|
homepage "https://keybase.io/"
|
2015-02-21 13:37:27 +00:00
|
|
|
url "https://github.com/keybase/node-client/archive/v0.7.7.tar.gz"
|
2015-03-28 04:59:49 +00:00
|
|
|
sha256 "ae08423181867d071b23acb3f359b7341532290014eb42775eb7384a7ea757dc"
|
2014-09-18 11:05:21 +00:00
|
|
|
head "https://github.com/keybase/node-client.git"
|
|
|
|
|
|
|
|
depends_on "node"
|
2015-01-18 13:31:30 +00:00
|
|
|
depends_on :gpg
|
2014-09-18 11:05:21 +00:00
|
|
|
|
|
|
|
def install
|
2015-03-28 04:59:49 +00:00
|
|
|
# remove self-update command
|
|
|
|
# https://github.com/keybase/keybase-issues/issues/1477
|
|
|
|
rm "lib/command/update.js"
|
|
|
|
inreplace "lib/command/all.js", '"update", ', ""
|
|
|
|
inreplace "lib/req.js", "keybase-installer", "brew update && brew upgrade keybase"
|
|
|
|
|
2014-09-18 11:05:21 +00:00
|
|
|
libexec.install Dir["*"]
|
|
|
|
(bin/"keybase").write <<-EOS.undent
|
|
|
|
#!/bin/sh
|
|
|
|
export KEYBASE_BIN="#{bin}/keybase"
|
2014-10-27 03:30:28 +00:00
|
|
|
exec "#{Formula["node"].opt_bin}/node" "#{libexec}/bin/main.js" "$@"
|
2014-09-18 11:05:21 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/keybase", "id", "maria"
|
|
|
|
end
|
|
|
|
end
|