#!/bin/bash install () { local RVM_OPTS=() if [[ "$BUILD_RUBY_VERSION" == "2.4"* ]] && [[ "$TRAVIS_OS_NAME" = "linux" ]]; then RVM_OPTS+=("--disable-binary") fi if [[ ! -z "$RUBY_STATIC" ]]; then RVM_OPTS+=("--disable-shared") fi if [ ${#RVM_OPTS[@]} -eq 0 ]; then local RVM_CMD="rvm install $BUILD_RUBY_VERSION" else local RVM_CMD="rvm install ${RVM_OPTS[@]} $BUILD_RUBY_VERSION" fi echo "Running: $RVM_CMD" eval $RVM_CMD source "$HOME/.rvm/scripts/rvm" rvm use "$BUILD_RUBY_VERSION" } if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then install fi