Skip to content

Commit

Permalink
Merge pull request #7 from mrtazz/pd-linux-checksum
Browse files Browse the repository at this point in the history
pd linux fixes and CI improvements
  • Loading branch information
mrtazz authored Jan 31, 2024
2 parents 29b34cd + 14f3f64 commit 9f2b9cf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# some tasks

GITHUB_HEAD_REF ?= main
OS := $(shell uname -s)
ARCH := $(shell uname -m)
ifeq ($(OS),Darwin)
ifeq ($(ARCH), arm64)
HOMEBREW_LOCATION := /opt/homebrew/bin
HOMEBREW_LOCATION := /opt/homebrew
else
HOMEBREW_LOCATION := /usr/local/bin
HOMEBREW_LOCATION := /usr/local
endif
HOMEBREW_TAP_LOCATION := $(HOMEBREW_LOCATION)/Library/Taps
else ifeq ($(OS),Linux)
HOMEBREW_LOCATION := /home/linuxbrew/.linuxbrew/bin
HOMEBREW_LOCATION := /home/linuxbrew/.linuxbrew
HOMEBREW_TAP_LOCATION := $(HOMEBREW_LOCATION)/Homebrew/Library/Taps
endif

BREW := $(HOMEBREW_LOCATION)/brew
BREW := $(HOMEBREW_LOCATION)/bin/brew

$(BREW):
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/install_homebrew.sh
Expand All @@ -30,6 +33,7 @@ brew-update: $(BREW)
.PHONY: brew-tap
brew-tap:
$(BREW) tap mrtazz/oss
cd $(HOMEBREW_TAP_LOCATION)/mrtazz/homebrew-oss && git checkout $(GITHUB_HEAD_REF)

%:
$(BREW) install mrtazz/oss/$@
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview
This is a collection of formula for my open source projects so they are easily
installable on OSX.
installable via homebrew.

## Installation
```
Expand Down
8 changes: 6 additions & 2 deletions pd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ def self.arch

def self.binary_checksum
checksum = ""
checksum = "1fb004711e10959eeaf63d1ad7439f024a1ad6e8ddfcc769cef938effa68d962" if Hardware::CPU.arm?
checksum = "8b8172303ed5883063b274cf55d9db83f1b96008f301839ed52181eaeb637ede" if Hardware::CPU.intel?
if OS.mac?
checksum = "1fb004711e10959eeaf63d1ad7439f024a1ad6e8ddfcc769cef938effa68d962" if Hardware::CPU.arm?
checksum = "8b8172303ed5883063b274cf55d9db83f1b96008f301839ed52181eaeb637ede" if Hardware::CPU.intel?
elsif OS.linux?
checksum = "77593421d1bf58eaade795c311b120a276fb2bc868e127b6272421a7f7ca7b58"
end
checksum
end

Expand Down

0 comments on commit 9f2b9cf

Please sign in to comment.