summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-10-21 16:27:52 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-10-21 16:27:52 -0400
commit2f7a1f33ab6fc5017cd58e9db61e430dffc73846 (patch)
tree2af3dff964c69167c4518b004ff4bbc6fc22ac5a
parentb83c46ff532390168eeb793dbb0c21f47389fcec (diff)
Add the user's rubygems bin to $PATH, if it exists
-rw-r--r--.profile13
1 files changed, 6 insertions, 7 deletions
diff --git a/.profile b/.profile
index 4bf1916..a6704af 100644
--- a/.profile
+++ b/.profile
@@ -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