Sha256: 1ce8225146c25d02e1331c69ebf5ef1d2e3336a92f73c31f991f61b3be5ace4c
Contents?: true
Size: 1.05 KB
Versions: 65
Compression:
Stored size: 1.05 KB
Contents
#!/bin/bash --login # USE THIS SCRIPT WHEN UPGRADING RUBY if [[ $PWN_ROOT == '' ]]; then if [[ ! -d '/pwn' ]]; then pwn_root=$(pwd) else pwn_root='/pwn' fi else pwn_root="${PWN_ROOT}" fi function usage() { echo $"Usage: $0 <new ruby version e.g. 2.4.4> <optional bool running from build_pwn_gem.sh>" exit 1 } source /etc/profile.d/rvm.sh new_ruby_version=$1 if [[ $2 != '' ]]; then old_ruby_version=$2 else old_ruby_version=`cat ${pwn_root}/.ruby-version` fi ruby_gemset=`cat ${pwn_root}/.ruby-gemset` if [[ $# < 1 ]]; then usage fi # Upgrade RVM #curl -sSL https://get.rvm.io | sudo bash -s latest curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import - curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg2 --import - export rvmsudo_secure_path=1 rvmsudo rvm get latest rvm reload # Install New Version of RubyGems & Ruby cd $pwn_root && ./vagrant/provisioners/gem.sh rvmsudo rvm install ruby-$new_ruby_version echo $new_ruby_version > $pwn_root/.ruby-version cd $pwn_root && rvm use $new_ruby_version@$ruby_gemset && ./build_pwn_gem.sh
Version data entries
65 entries across 65 versions & 1 rubygems