diff --git a/Makefile b/Makefile index 1a92d2c..fed7fef 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,11 @@ link: -ln -s ~/Git/dotfiles/.tmux.conf ~ brew: - -sh -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -brew bundle --file ./macos/Brewfile + -./macos/install_brew.sh -sudo chsh -s /usr/local/bin/bash cask: - brew bundle --file ./macos/Caskfile + -brew bundle --file ./macos/Caskfile cask_personal: -brew bundle --file ./macos/Caskfile.personal diff --git a/macos/install_brew.sh b/macos/install_brew.sh new file mode 100755 index 0000000..2e89969 --- /dev/null +++ b/macos/install_brew.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check for Homebrew and install if missing +if test ! $(which brew); then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.bash_profile.local + eval "$(/opt/homebrew/bin/brew shellenv)" +fi + +brew update + +brew tap homebrew/bundle + +brew bundle --file ./macos/Brewfile