Skip to content

Commit d031706

Browse files
committed
Remove brew.sh dependency
1 parent 1ef5f15 commit d031706

2 files changed

Lines changed: 13 additions & 42 deletions

File tree

bin/cfgmanager

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,23 @@ remove_links() {
8585

8686
install_brew() {
8787
echo "Installing brew"
88-
case $(uname -sm) in
89-
"Darwin arm64")
90-
brew=/opt/homebrew/bin/brew
91-
;;
92-
*)
93-
brew=/usr/local/bin/brew
94-
;;
95-
esac
88+
brew=/opt/homebrew/bin/brew
9689
test -x $brew && echo "Brew already installed: $brew" && return
9790
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
9891
}
9992

93+
brew_bundle() {
94+
echo "Running brew bundle"
95+
brew update
96+
brew bundle --global --verbose --force
97+
}
98+
99+
bundle_cleanup() {
100+
echo "Running brew bundle cleanup"
101+
brew update
102+
brew bundle cleanup --global --verbose --force
103+
}
104+
100105
clone_repo() {
101106
echo "Cloning dotfiles repo"
102107
test -d $DOTFILES_REPO_DIR/.git && echo "Repo already exists: $DOTFILES_REPO_DIR" && return
@@ -108,7 +113,6 @@ bootstrap() {
108113
install_brew
109114
clone_repo
110115
create_links
111-
source $DOTFILES_REPO_DIR/scripts/brew.sh
112116
brew_bundle
113117
}
114118

@@ -127,11 +131,9 @@ EOS
127131

128132
case $1 in
129133
--brew-bundle)
130-
source $DOTFILES_REPO_DIR/scripts/brew.sh
131134
brew_bundle
132135
;;
133136
--bundle-cleanup)
134-
source $DOTFILES_REPO_DIR/scripts/brew.sh
135137
bundle_cleanup
136138
;;
137139
--create-links)

scripts/brew.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)