Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bbr for linuxbrew #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions bbr.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
class Bbr < Formula
desc "BOSH Backup and Restore CLI"
homepage "https://github.com/cloudfoundry-incubator/bosh-backup-and-restore"
url "https://github.com/cloudfoundry-incubator/bosh-backup-and-restore/releases/download/v1.7.2/bbr-1.7.2.tar"
sha256 "73daa9c245e9ec91611a6a9e2a520d51c625b9a0a566dffff2fa5a66455cfac7"

version "1.7.2"

if OS.mac?
url "https://github.com/cloudfoundry-incubator/bosh-backup-and-restore/releases/download/v#{version}/bbr-#{version}-darwin-amd64"
sha256 "fb53d4c033ad6442b1aeda52c4ff10a14e5701068b0b19d3021213ca23687128"
elsif OS.linux?
url "https://github.com/cloudfoundry-incubator/bosh-backup-and-restore/releases/download/v#{version}/bbr-#{version}-linux-amd64"
sha256 "a0c460d238ed4815049a2459d98c5ae2b79d16ae8558b1f7d07262de2b8c9faa"
end

depends_on :arch => :x86_64

def install
bin.install "bbr-mac" => "bbr"
binary_name = "bbr"
if OS.mac?
bin.install "bbr-#{version}-darwin-amd64" => binary_name
elsif OS.linux?
bin.install "bbr-#{version}-linux-amd64" => binary_name
end
end

test do
Expand Down