From 519a0b1bb2186a94b213c871cbf597950fc53a08 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 31 Mar 2011 17:24:00 +0200 Subject: [PATCH] Create and add $rvm_bin_path if necessary --- scripts/functions/installer | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/functions/installer b/scripts/functions/installer index 1ea6ce2334..a9e0a5019a 100644 --- a/scripts/functions/installer +++ b/scripts/functions/installer @@ -276,6 +276,7 @@ create_install_paths() for install_path in "${install_paths[@]}" ; do [[ -d "$rvm_path/$install_path" ]] || mkdir -p "$rvm_path/$install_path" done + [[ -d "$rvm_bin_path" ]] || mkdir -p "$rvm_bin_path" return 0 } @@ -767,6 +768,14 @@ if [ -n \"\${BASH_VERSION:-}\" -o -n \"\${ZSH_VERSION:-}\" ] ; then ps1_set fi fi + + # Add $rvm_bin_path to $PATH in necessary + if [[ \"\${rvm_bin_path}\" != \"\${rvm_path}/bin\" ]] ; then + regex=\"^([^:]*:)*\${rvm_bin_path}(:[^:]*)*\$\" + if [[ ! \"\${PATH}\" =~ \$regex ]] ; then + export PATH=\"\${rvm_bin_path}:\${PATH}\" + fi + fi fi " >> "${etc_profile_file}"