Last active
June 20, 2019 21:47
-
-
Save k3n/d0616ef46a9a3213d8bed3a88ec5146e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd ~ | |
# Install command line tools | |
xcode-select -r | |
xcode-select -p | |
if [[ $? -ne 0 ]]; then | |
xcode-select --install | |
fi | |
# A full installation of Xcode.app is required to compile macvim. | |
# Installing just the Command Line Tools is not sufficient. | |
xcodebuild -version | |
if [[ $? -ne 0 ]]; then | |
# TODO: find a way to install Xcode.app automatticaly | |
# See: http://stackoverflow.com/a/18244349 | |
# Accept Xcode license | |
sudo xcodebuild -license | |
fi | |
# Install Homebrew if not found | |
brew --version | |
if [[ $? -ne 0 ]]; then | |
# Clean-up failed Homebrew install | |
rm -rf "/usr/local/Cellar" "/usr/local/.git" | |
# Install Homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
brew update | |
brew install git | |
git clone https://github.com/k3n/dotfiles.git ~/.dotfiles | |
cd ~/.dotfiles | |
script/bootstrap | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment