summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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