1
0
mirror of https://github.com/danbee/mac-setup synced 2025-03-04 08:39:10 +00:00

We need Homebrew before we get git

Because installing Homebrew installs the Xcode command line tools.
This commit is contained in:
Daniel Barber 2019-04-15 21:58:31 -04:00
parent 25447c2c60
commit abad92f2d9
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
2 changed files with 9 additions and 11 deletions

7
lib/homebrew.sh Executable file → Normal file
View File

@ -1,8 +1 @@
#!/bin/sh
if ! type brew > /dev/null; then
/usr/bin/ruby -e \
"$(curl \
-fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

View File

@ -23,6 +23,15 @@ if [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then
read -n 1 -s
fi
# Install Homebrew
step "Installing Homebrew"
if ! type brew > /dev/null; then
/usr/bin/ruby -e \
"$(curl \
-fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Clone setup repo
if [ ! -d "$MAC_SETUP_DIR" ]; then
git clone git@github.com:danbee/mac-setup.git "$HOME/mac-setup"
@ -32,10 +41,6 @@ else
cd -
fi
# Install Homebrew
step "Installing Homebrew"
"$MAC_SETUP_DIR/lib/homebrew.sh"
# Install brew bundles
step "Installing Homebrew bundle"
brew bundle --file="$MAC_SETUP_DIR/Brewfile"