ruby-2.2.sh 789 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. fw_depends rvm
  3. # rvm stable [typically] only provides one version of ruby-2.2
  4. # update this when it changes
  5. MRI_VERSION=2.2.1
  6. RETCODE=$(fw_exists ${IROOT}/ruby-${MRI_VERSION}.installed)
  7. [ ! "$RETCODE" == 0 ] || { \
  8. # Load environment variables
  9. source $IROOT/ruby-$MRI_VERSION.installed
  10. return 0; }
  11. # We assume single-user installation as
  12. # done in our rvm.sh script and
  13. # in Travis-CI
  14. if [ "$TRAVIS" = "true" ]
  15. then
  16. rvmsudo rvm install $MRI_VERSION
  17. # Bundler is SOMETIMES missing... not sure why.
  18. rvmsudo rvm $MRI_VERSION do gem install bundler
  19. else
  20. rvm install $MRI_VERSION
  21. # Bundler is SOMETIMES missing... not sure why.
  22. rvm $MRI_VERSION do gem install bundler
  23. fi
  24. echo "" > $IROOT/ruby-$MRI_VERSION.installed
  25. source $IROOT/ruby-$MRI_VERSION.installed