Skip to content

Instantly share code, notes, and snippets.

@norrs
Created August 20, 2013 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norrs/6285545 to your computer and use it in GitHub Desktop.
Save norrs/6285545 to your computer and use it in GitHub Desktop.
rockj@rockj-VirtualBox:~/nav-mirror-netmap/tools$ cat rvm_and_veewee_install.sh
#!/bin/bash
# Install rvm under VCS-ROOT/tools/.rvm and veewee to VCS-ROOT/tools/veewee
#
# Based on http://stacktoheap.com/blog/2013/06/19/building-a-debian-wheezy-vagrant-box-using-veewee/
# :-)
unset rvm_bin_path
unset GEM_HOME
unset IRBRC
unset MY_RUBY_HOME
unset rvm_path
unset rvm_prefix
unset rvm_version
BASE_DIR=$(dirname $0)
BASE_FULL_DIR=$( cd $(dirname $0) ; pwd -P )
RVM_PATH="$BASE_FULL_DIR/.rvm"
export rvm_path=$RVM_PATH
if [ ! -d $RVM_PATH ]; then
\curl -L https://get.rvm.io | bash -s stable --ignore-dotfiles --autolibs=read-fail --path $RVM_PATH
fi
# We'll source it manually ..
source $RVM_PATH/scripts/rvm
# rvm install failing? Check with rvm requirements for missing requirements!
rvm install 1.9.2
if [ ! -d $BASE_DIR/veewee ]; then
# todo: fork repository due to warning below? :-)
git clone https://github.com/jedi4ever/veewee.git
rvm rvmrc warning ignore $BASE_FULL_DIR/veewee/.rvmrc
rvm rvmrc trust $BASE_FULL_DIR/veewee/.rvmrc
cd $BASE_DIR/veewee
else
rvm rvmrc warning ignore $BASE_FULL_DIR/veewee/.rvmrc
rvm rvmrc trust $BASE_FULL_DIR/veewee/.rvmrc
cd $BASE_DIR/veewee
git checkout master
fi
rvm use 1.9.2@veewee --create
gem install bundler
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment