Skip to content

Instantly share code, notes, and snippets.

@mgrubb
Created April 20, 2012 18:05
Show Gist options
  • Select an option

  • Save mgrubb/2430756 to your computer and use it in GitHub Desktop.

Select an option

Save mgrubb/2430756 to your computer and use it in GitHub Desktop.
Script to run a command in every version directory for rbenv
#!/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