Skip to content

Instantly share code, notes, and snippets.

@erikh
Created December 6, 2011 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikh/fbb5e9ffade5accfafa5 to your computer and use it in GitHub Desktop.
Save erikh/fbb5e9ffade5accfafa5 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ -d "/opt/ruby/$1" ]
then
export PATH="/opt/ruby/$1/bin:${PATH#/opt/ruby/*:}"
else
echo "please supply a directory name" 2>&1
exit 1
fi
# save as myvm
# then in .profile:
alias myvm=". ./myvm"
# usage
$ myvm 1.9.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment