From b2cc2221768892060081d1aef4eeb1d31c2ef669 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Sun, 28 Apr 2013 11:14:15 +0200 Subject: [PATCH] version-independent loading of the ruby bin directory --- .bashrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 8208cfe..f5c86b3 100644 --- a/.bashrc +++ b/.bashrc @@ -18,8 +18,12 @@ export DEBEMAIL="rodolphe.breard@uraniborg.net" export DEBFULLNAME="$USER_NICKNAME" # Ruby bin directory -if [ -d "$HOME/.gem/ruby/2.0.0/bin" ]; then - export PATH="$PATH:$HOME/.gem/ruby/2.0.0/bin" +if [ -d "$HOME/.gem/ruby" ]; then + for file in $HOME/.gem/ruby/*; do + if [ -d "$file" -a -d "$file/bin" ]; then + export PATH="$PATH:$file/bin" + fi + done fi # OS