Last active
January 3, 2016 03:26
-
-
Save svs14/a6c4a29ef3beff07e90b to your computer and use it in GitHub Desktop.
Bootstraps a fresh OS X 10.11 install with env-custom (dot files) and oh-my-zsh.
This file contains 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
#!/bin/bash | |
# | |
# Bootstraps env-custom for OSX 10.11 | |
# additionally with oh-my-zsh. | |
# | |
# Set bash to exit immediately on failure | |
set -e | |
# Set bash statements to return failure if any piped command within it fails | |
set -o pipefail | |
# Change directory to home | |
cd ~ | |
# Setup homebrew | |
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Update and install required | |
brew install python --framework | |
brew install \ | |
git curl bash zsh vim tmux cmake coreutils findutils | |
# Retrieve env-custom | |
git clone https://github.com/sjenkz/dotfiles.git .env_custom | |
# Install oh-my-zsh | |
.env_custom/zsh/install-oh-my-zsh.sh || true | |
# Reconfigure zsh theme | |
gsed -i 's/robbyrussell/nicoulaj/' .zshrc | |
# Disable correction | |
gsed -i 's/# DISABLE_CORRECTION="true"/DISABLE_CORRECTION="true"/' .zshrc | |
# OSX specific changes to scripts | |
gsed -i "s/\breadlink\b/greadlink/" .env_custom/install.sh | |
gsed -i "s/\bsed\b/gsed/" .env_custom/install.sh | |
gsed -i "s/\breadlink\b/greadlink/" .env_custom/uninstall.sh | |
gsed -i "s/\bsed\b/gsed/" .env_custom/uninstall.sh | |
gsed -i "s/\bxargs\b/gxargs/" .env_custom/shell-settings/.shellrc | |
# Install env-custom | |
.env_custom/install.sh | |
# Default shell to zsh | |
sudo chsh -s $(which zsh) $USER || true | |
# Notify success of installation | |
echo "Installation succeeded." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment