Created
April 5, 2012 13:18
-
-
Save antekpiechnik/2310979 to your computer and use it in GitHub Desktop.
Laptop
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 | |
echo "Checking for gcc.." | |
command -v gcc --version >/dev/null 2>&1 || { echo >&2 " It's not installed. Please download the latest Command Line Tools for XCode"; open http://developer.apple.com/downloads; exit 1; } | |
echo "Checking for SSH key, generating one if it doesn't exist.." | |
[[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa | |
echo "Copying public key to clipboard. Paste it into your Github account.." | |
[[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy | |
open https://github.com/account/ssh | |
echo "Installing Homebrew, a good OS X package manager.." | |
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
brew update | |
echo "Put Homebrew location earlier in PATH.." | |
echo " | |
# recommended by brew doctor | |
export PATH='/usr/local/bin:$PATH'" >> ~/.bashrc | |
source ~/.bashrc | |
echo "Installing RVM.." | |
command -v rvm --version >/dev/null 2>&1 | |
rc=$? | |
if [[ $rc != 0 ]]; then | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
echo " | |
# RVM | |
[[ -s '/Users/`whoami`/.rvm/scripts/rvm' ]] && source '/Users/`whoami`/.rvm/scripts/rvm'" >> ~/.bashrc | |
source ~/.bashrc | |
fi | |
echo "Installing ruby 1.9.3-p125.." | |
rvm install 1.9.3-p125 | |
rvm use 1.9.3-p125 --default | |
echo "Installing bundler.." | |
gem install bundler --no-rdoc --no-ri | |
echo "Installing git.." | |
brew install git | |
echo "Installing ack, wget, curl.." | |
brew install ack wget curl | |
echo "Installing nginx.." | |
brew install nginx | |
echo "Installing qt for capybara-webkit nginx.." | |
brew install qt | |
echo "Installing mysql.." | |
brew install mysql | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/mysql/5.5.20/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
echo "Installing newest bash.." | |
brew install bash | |
sudo echo "/usr/local/bin/bash" >> /etc/shells | |
sudo dscl . -change /Users/`whoami` UserShell /bin/bash /usr/local/bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment