From 2f7a1f33ab6fc5017cd58e9db61e430dffc73846 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Oct 2011 16:27:52 -0400 Subject: Add the user's rubygems bin to $PATH, if it exists --- .profile | 13 ++++++------- 1 file 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 -- cgit v1.1-4-g5e80