Created
May 2, 2010 23:36
-
-
Save Pistos/387553 to your computer and use it in GitHub Desktop.
A little wrapper script to run RVM-based Ruby interpreters from cron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z ${2} ]]; then | |
echo "$0 <ruby interpreter|'default'> <arguments to ruby interpreter>" | |
exit 1 | |
fi | |
if [[ -s /opt/rvm/scripts/rvm ]] ; then source /opt/rvm/scripts/rvm ; fi | |
rvm use "${1}" | |
ruby "${@:2}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment