Skip to content

Commit 0ceccc5

Browse files
committed
Install brew via install-brew.sh
1 parent 5d1719d commit 0ceccc5

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ install-packages: install-brew
1515
eval "$$($(brew) shellenv)" && $(brew) bundle --file home/.Brewfile --force --no-lock
1616

1717
.PHONY: install-brew
18-
install-brew: $(brew)
19-
$(brew):
20-
@echo "Installing Homebrew"
21-
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
18+
install-brew:
19+
scripts/install-brew.sh
2220

2321
.PHONY: link
2422
link:

scripts/install-brew.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
arch=$(uname -m)
6+
brew=/opt/homebrew/bin/brew
7+
test "x86_64" == $arch && brew=/usr/local/bin/brew
8+
9+
if test -e $brew; then
10+
echo "Homebrew already installed"
11+
exit 0
12+
fi
13+
14+
echo "Installing Homebrew"
15+
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash

0 commit comments

Comments
 (0)