Created
June 6, 2011 16:20
-
-
Save vitaly/1010573 to your computer and use it in GitHub Desktop.
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
✗ which bundle | |
bundle () { | |
if ( | |
unset bundle | |
command -v bundle > /dev/null 2>&1 | |
) | |
then | |
true | |
else | |
if ( | |
unset gem | |
command -v gem > /dev/null 2>&1 | |
) | |
then | |
printf "The rubygem 'bundler' is not installed. Installing it now.\n" | |
gem install bundler | |
else | |
printf "Cannot use 'bundler' as 'gem' was not found in the path!.\n" | |
fi | |
fi | |
if ( | |
unset bundle | |
command -v bundle > /dev/null 2>&1 | |
) | |
then | |
printf "Bundling your gems. This may take a few minutes on first run.\n" | |
if [[ "$*" =~ *install* ]] | |
then | |
command bundle "$@" --binstubs | |
else | |
command bundle "$@" | |
fi | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment