Created
February 11, 2017 21:43
-
-
Save carlweis/b4ccc7ea45fe02d0b5849bb23840595b to your computer and use it in GitHub Desktop.
Shell script to setup a rails development machine
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
#!/bin/sh | |
# exit on any error | |
set -e | |
echo | echo "$(tput setaf 3)Setting up machine for Ruby on Rails development\n\n" | |
echo "$(tput setaf 3)Installing laptop setup..." | |
echo "$(tput setaf 7)" | |
curl --remote-name https://raw.githubusercontent.com/thoughtbot/laptop/master/mac | |
sh mac 2>&1 | |
echo | echo "$(tput setaf 2)Finished installing gems\n\n" | |
echo "$(tput setaf 3)Changing default shell to zsh..." | |
echo "$(tput setaf 7)" | |
chsh -s $(which zsh) | |
echo | echo "$(tput setaf 2)Finished setting shell to zsh\n\n" | |
echo "$(tput setaf 3)Cloning dotfiles from github..." | |
echo "$(tput setaf 7)" | |
git clone git://github.com/thoughtbot/dotfiles.git ~/.dotfiles | |
echo | echo "$(tput setaf 2)Finished cloning dotfiles.\n\n" | |
echo "$(tput setaf 3)Installing rcm to manage dotfiles..." | |
echo "$(tput setaf 7)" | |
brew tap thoughtbot/formulae | |
brew install rcm | |
echo | echo "$(tput setaf 2)Finished installing rcm\n\n" | |
echo "$(tput setaf 3)Installing dotfiles..." | |
echo "$(tput setaf 7)" | |
env RCRC=$HOME/.dotfiles/rcrc rcup | |
echo | echo "$(tput setaf 2)Finished installing dotfiles\n\n" | |
echo "$(tput setaf 3)Creating local dotfiles for overrides/customizations..." | |
echo "$(tput setaf 7)" | |
touch "~/.aliases.local" | echo "~/.aliases.local" | |
touch "~/.gitconfig.local" | echo "~/.gitconfig.local" | |
echo "[alias]\nl = log --pretty=colored\n[pretty]\ncolored = format:%Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset\n[user]\nname = $USER\nemail = [email protected]" > "~/.gitconfig.local" | |
touch "~/.psqlrc.local" | echo "~/.psqlrc.local" | |
touch "~/.tmux.conf.local" | echo "~/.tmux.conf.local" | |
touch "~/.vimrc.local" | echo "~/.vimrc.local" | |
touch "~/.vimrc.bundles.local" | echo "~/.vimrc.bundles.local" | |
touch "~/.zshrc.local" | echo "~/.zshrc.local" | |
echo | echo "$(tput setaf 2)Finished creating local dotfiles\n\n" | |
echo | echo "$(tput setaf 2)Laptop setup is complete!\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment