Skip to content

Commit

Permalink
Git comes standard with recent XCode or CLT.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Sep 30, 2013
1 parent 9289143 commit 42e912e
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions bin/dotfiles
Expand Up @@ -131,28 +131,11 @@ if [[ ! "$(type -P gcc)" && "$OSTYPE" =~ ^darwin ]]; then
exit 1
fi

# If Git is not installed...
if [[ ! "$(type -P git)" ]]; then
# OSX
if [[ "$OSTYPE" =~ ^darwin ]]; then
# It's easiest to get Git via Homebrew, so get that first.
if [[ ! "$(type -P brew)" ]]; then
e_header "Installing Homebrew"
true | /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
fi
# If Homebrew was installed, install Git.
if [[ "$(type -P brew)" ]]; then
e_header "Updating Homebrew"
brew update
e_header "Installing Git"
brew install git
fi
# Ubuntu.
elif [[ "$(cat /etc/issue 2> /dev/null)" =~ Ubuntu ]]; then
# Git is fairly easy.
e_header "Installing Git"
sudo apt-get -qq install git-core
fi
# If Git is not installed, install it (Ubuntu only, since Git comes standard
# with recent XCode or CLT)
if [[ ! "$(type -P git)" && "$(cat /etc/issue 2> /dev/null)" =~ Ubuntu ]]; then
e_header "Installing Git"
sudo apt-get -qq install git-core

This comment has been minimized.

fi

# If Git isn't installed by now, something exploded. We gots to quit!
Expand Down

0 comments on commit 42e912e

Please sign in to comment.