Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 46 lines (37 sloc) 0.546 kB
#!/bin/sh
gemname=$1
gempath=''
bundleshow() {
gempath=`bundle show $gemname`
rc=$?
if [[ $rc -ne 0 ]] ; then
echo $gempath
return 1
fi
return 0
}
gemwhich() {
gemlib=`gem which $gemname`
rc=$?
if [[ $rc -ne 0 ]] ; then
echo $gemlib
return 1
fi
gempath=`echo $gemlib | sed 's/\/lib\/.*//'`
return 0
}
bundleshow
rc=$?
if [[ $rc -eq 0 ]] ; then
mate $gempath
echo $gempath
exit 0
fi
gemwhich
rc=$?
if [[ $rc -eq 0 ]] ; then
mate $gempath
echo $gempath
exit 0
fi
echo "Can't find $gemname"
Jump to Line
Something went wrong with that request. Please try again.