Sha256: 97e433c7271ea00cf52ded949b8874f08bfa14a7acf706f9a8acb9b5480f71ff
Contents?: true
Size: 997 Bytes
Versions: 583
Compression:
Stored size: 997 Bytes
Contents
#!/bin/bash --login # USE THIS SCRIPT WHEN UPGRADING RUBY if [[ -d '/opt/pwn' ]]; then pwn_root='/opt/pwn' 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://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 stable 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 / && cd $pwn_root && rvm use $new_ruby_version@$ruby_gemset && ./build_pwn_gem.sh rvmsudo gem pristine --all
Version data entries
583 entries across 583 versions & 1 rubygems