Created
April 20, 2012 18:05
-
-
Save mgrubb/2430756 to your computer and use it in GitHub Desktop.
Script to run a command in every version directory for rbenv
This file contains hidden or 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 | |
| path="$1" | |
| shift | |
| for version in `rbenv versions --bare` | |
| do | |
| prefix="`rbenv root`/versions/$version" | |
| if [ -e "$prefix/$path" ] | |
| then | |
| "$@" "$prefix/$path" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment