From abad92f2d92080a33842493e165be09cfe3028a8 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Mon, 15 Apr 2019 21:58:31 -0400 Subject: [PATCH] We need Homebrew before we get git Because installing Homebrew installs the Xcode command line tools. --- lib/homebrew.sh | 7 ------- setup.sh | 13 +++++++++---- 2 files changed, 9 insertions(+), 11 deletions(-) mode change 100755 => 100644 lib/homebrew.sh diff --git a/lib/homebrew.sh b/lib/homebrew.sh old mode 100755 new mode 100644 index b093d52..1a24852 --- a/lib/homebrew.sh +++ b/lib/homebrew.sh @@ -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 diff --git a/setup.sh b/setup.sh index 24e01a4..2009380 100755 --- a/setup.sh +++ b/setup.sh @@ -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"