Skip to content

Commit

Permalink
mac is now a shell script. both mac & ubuntu now install ruby 1.9.2-p…
Browse files Browse the repository at this point in the history
…180. installing git before RVM. (dependency)
  • Loading branch information
Dan Croak committed May 1, 2011
1 parent 444e4e4 commit fc2143f
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 60 deletions.
10 changes: 8 additions & 2 deletions README.md
Expand Up @@ -6,11 +6,17 @@ Laptop is a set of scripts to get your laptop set up as a development machine.
Mac OS X
--------

First, install XCode. It comes with your OS X CD or you can [download it](http://developer.apple.com/technologies/tools/xcode.html).
First, install [XCode](http://developer.apple.com/technologies/tools/xcode.html).

ruby -e "$(curl -fsSL https://github.com/thoughtbot/laptop/raw/master/mac.rb)"
Then, run this one-liner:

bash < <( https://github.com/thoughtbot/laptop/raw/master/mac )

Ubuntu
------

First, install [Ubuntu](http://www.ubuntu.com/download).

Then, run this one-liner:

bash < <( curl https://github.com/thoughtbot/laptop/raw/master/ubuntu )
46 changes: 46 additions & 0 deletions mac
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

printf "Installing Homebrew, a great OS X package manager ..."
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

printf "Installing git for version control ..."
brew git

printf "Installing Postgres, a great open source relational database ..."
brew install postgres --no-python

printf "Installing Redis, a key-value database ..."
brew install redis

printf "Installing ImageMagick, good for cropping and re-sizing images ..."
brew install imagemagick

printf "Installing RVM (Ruby Version Manager) ..."
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bash_profile
source ~/.rvm/scripts/rvm
source ~/.bash_profile

printf "Installing Ruby 1.9 and making it the default Ruby ..."
rvm install 1.9.2-p180
rvm use 1.9.2-p180 --default

printf "Installing Bundler for managing Ruby libraries ..."
gem install bundler --no-rdoc --no-ri

printf "Installing Rails to write and run web applications ..."
gem install rails --no-rdoc --no-ri

printf "Installing the Heroku gem to interact with the http://heroku.com API ..."
gem install heroku --no-rdoc --no-ri

printf "Installing the Taps gem to push and pull SQL databases between development, staging, and production environments ..."
gem install taps --no-rdoc --no-ri

printf "Setting up SSH keys. Press enter at each prompt ..."
ssh-keygen

printf "Copying public key to clipboard. Paste it into your Github account ..."
cat ~/.ssh/id_rsa.pub | pbcopy
open https://github.com/account/ssh

44 changes: 0 additions & 44 deletions mac.rb

This file was deleted.

28 changes: 14 additions & 14 deletions ubuntu
Expand Up @@ -10,16 +10,21 @@ printf "Installing OS packages. You will be prompted for your password ..."
sudo apt-get update
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev

printf "Installing RVM (Ruby Version Manager) ..."
curl -s -O -L -B https://rvm.beginrescueend.com/releases/rvm-install-head
chmod +x rvm-install-head
"$PWD/rvm-install-head"
[[ -f rvm-install-head ]] && rm -f rvm-install-head
printf "Install Postgres, a great open source relational database ..."
sudo apt-get libpq-dev postgresql

printf "Setting up RVM to load with new shells ..."
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> "$HOME/.bash_profile"
source ~/.bash_profile
printf "Installing ImageMagick, good for cropping and re-sizing images ..."
sudo apt-get install imagemagick --fix-missing

printf "Installing RVM (Ruby Version Manager) ..."
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bash_profile
source ~/.rvm/scripts/rvm
source ~/.bash_profile

printf "Installing Ruby 1.9 and making it the default Ruby ..."
rvm install 1.9.2-p180
rvm use 1.9.2-p180 --default

printf "Installing Bundler for managing Ruby libraries ..."
gem install bundler --no-rdoc --no-ri
Expand All @@ -36,15 +41,10 @@ printf "Installing the Taps gem to push and pull SQL databases between developme
printf "Installing the sqlite3 gem ..."
gem install sqlite3 --no-rdoc --no-ri

printf "Install Postgres, a great open source relational database ..."
sudo apt-get libpq-dev postgresql

printf "Installing ImageMagick, good for cropping and re-sizing images ..."
sudo apt-get install imagemagick --fix-missing

printf "Setting up SSH keys. Press enter at each prompt ..."
ssh-keygen

printf "This is your public key. Copy and paste it into your Github account ..."
cat ~/.ssh/id_rsa.pub
open https://github.com/account/ssh

0 comments on commit fc2143f

Please sign in to comment.