Skip to content

Instantly share code, notes, and snippets.

@duggiefresh
Last active December 23, 2015 05:39
Show Gist options
  • Save duggiefresh/6588771 to your computer and use it in GitHub Desktop.
Save duggiefresh/6588771 to your computer and use it in GitHub Desktop.
This is first pass of a script to install Ruby via rbenv, Vim (optional Janus plugs), and zsh (oh-my-zsh).
#! /bin/bash
#
# This simple script will get you a pretty decent Ruby development setup
# for Debian based machines.
#
# Included are: Vim, tmux, Git, zsh, Janus*, rbenv.
#
# Use at your own risk!.. Buhaha
#
# Created by Doug Yun yun.douglas@gmail.com
echo 'Installing a sweet development setup.'
echo 'Updating and Upgrading...'
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get -y install vim tmux git zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh $USER
sudo apt-get -y install libssl-dev zlib1g-dev libreadline-dev libyaml-dev
sudo apt-get update && sudo apt-get -y upgrade
echo 'Getting rbenv installed...'
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL -l
echo 'Creating a ruby-build directory'
mkdir -p ~/.rbenv/plugins
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
cd ~/.rbenv/plugins/ruby-build
rbenv install 2.0.0-p247
rbenv rehash
rbenv global 2.0.0-p247
rbenv rehash
cd
read -p "Do you want Janus? (y/n)"
if [[ "$REPLY" == [yY] ]]; then
echo "Great, we'll install Janus..."
curl -Lo- https://bit.ly/janus-bootstrap | bash
else
echo "That's okay, no Janus today..."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment