From 28a8b996b7100df378ff83184be457fe917a62bf Mon Sep 17 00:00:00 2001 From: Ioannis Polyzos Date: Wed, 8 Apr 2020 10:36:20 +0100 Subject: [PATCH] bbr for linux --- bbr.rb | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bbr.rb b/bbr.rb index a301d8f2..2929a01d 100644 --- a/bbr.rb +++ b/bbr.rb @@ -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