Skip to content

Instantly share code, notes, and snippets.

@mileszs
Created July 30, 2009 21:31
Show Gist options
  • Select an option

  • Save mileszs/158943 to your computer and use it in GitHub Desktop.

Select an option

Save mileszs/158943 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Unattended script for installing all the stuff I like to install on new machine
if [ "$(whoami)" != "root" ]; then
echo "You need to be root to run this!"
exit 2
fi
function echo_newline {
echo -e "\n"
}
function pretty_echo {
echo_newline
echo "-------------------------"
echo $1
echo_newline
}
pretty_echo "Updating..."
apt-get update && apt-get upgrade
pretty_echo "Installing compilers, etc...."
apt-get install -y build-essential curl
pretty_echo "Installing ruby, git, and htop..."
apt-get install -y htop ruby-full git-core
pretty_echo "Installing mysql and sqlite3..."
apt-get install -y mysql-client libmysqlclient15-dev sqlite3 libsqlite3-dev
pretty_echo "Installing other dependencies for various gems (libxml3, etc)..."
apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev
pretty_echo "Installing RubyGems..."
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xvzf rubygems-1.3.1.tgz
cd rubygems-1.3.1
ruby setup.rb
cd ../
ln -s /usr/bin/gem1.8 /usr/bin/gem
gem sources --add http://gems.github.com
pretty_echo "Installing a bunch of gems..."
gem install rails jscruggs-metric_fu webby mysql mocha thoughtbot-shoulda thoughtbot-factory_girl thin thor wirble ZenTest sqlite3-ruby redgreen mislav-will_paginate josevalim-rails-footnotes hpricot nokogiri heroku haml ferret acts_as_ferret dbi dbd-odbc coderay capistrano capistrano-ext cheat hirb RedCloth
echo "-------------------------"
echo "- Installation Complete -"
echo "-------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment