-
-
Save adam12/fd8d5873167400deee8af9e27be4dc90 to your computer and use it in GitHub Desktop.
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/sh | |
version="$1"; shift | |
bin="$1"; shift | |
binpath="$HOME/.rubies/$version/bin/$bin" | |
if [ -z "$version" ] || [ -z "$bin" ]; then | |
echo "$(basename "$0") <version> <bin> [args]" >&2 | |
exit 1 | |
fi | |
if [ ! -x "$binpath" ]; then | |
echo "Unable to find '$binpath'" >&2 | |
exit 1 | |
fi | |
exec "$binpath" "$@" | |
# vim:ts=2:sts=2:sw=2:et:ft=sh: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment