Skip to content

Instantly share code, notes, and snippets.

@pbosetti
Last active August 29, 2015 14:13
Show Gist options
  • Save pbosetti/492cbd8d697b4edd4119 to your computer and use it in GitHub Desktop.
Save pbosetti/492cbd8d697b4edd4119 to your computer and use it in GitHub Desktop.
Base debian setup
#!/bin/bash
RUBY_BASE=2.2
RUBY_TGZ=ruby-2.2.0
echo
echo "************************************"
echo "Updating package list"
if ! sudo apt-get update; then
echo "Could not update package list"
exit $?
fi
pkgs=(git clang make gnuplot octave curl libreadline6-dev libssl-dev zlib1g-dev libglew-dev libglu1-mesa-dev freeglut3-dev ntp open-vm-tools)
echo
echo "************************************"
echo "Installing packages"
for p in ${pkgs[@]}
do
echo
echo "Installing ${p}"
echo "---------------"
if ! sudo apt-get install -y --force-yes ${p}; then
echo "Error while installing ${p}"
exit $?
fi
done
echo
echo "************************************"
if command -v ruby >/dev/null; then
echo "Ruby already installed"
else
echo "Installing $RUBY_BASE"
wget http://cache.ruby-lang.org/pub/ruby/$RUBY_BASE/$RUBY_TGZ.tag.gz
tar xzf $RUBY_TGZ.tar.gz
cd $RUBY_TGZ
./configure --prefix=/usr/local --with-search-path=/usr
make
sudo make install
cd ..
rm -rf $RUBY_TGZ*
fi
echo
echo "************************************"
echo "Installing ruby gems"
sudo gem install pry colorize ffi gnuplotr --no-rdoc --no-ri
echo
echo "************************************"
echo " ALL DONE!"
echo "************************************"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment