diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-21 16:27:52 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-21 16:27:52 -0400 |
commit | 2f7a1f33ab6fc5017cd58e9db61e430dffc73846 (patch) | |
tree | 2af3dff964c69167c4518b004ff4bbc6fc22ac5a | |
parent | b83c46ff532390168eeb793dbb0c21f47389fcec (diff) |
Add the user's rubygems bin to $PATH, if it exists
-rw-r--r-- | .profile | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -9,13 +9,12 @@ umask 022 # set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ]; then - export PATH="$HOME/bin:$PATH" -fi - -if [ -d "$HOME/.prefix/bin" ]; then - export PATH="$HOME/.prefix/bin:$PATH" -fi +bins=`echo $HOME/bin $HOME/.prefix/bin $HOME/.gem/ruby/*/bin` +for dir in $bins; do + if [ -d "$dir" ]; then + export PATH="$dir:$PATH" + fi +done # if running bash if [ -n "$BASH_VERSION" ]; then |