Permalink
Browse files

Create and add $rvm_bin_path if necessary

  • Loading branch information...
1 parent 9e38679 commit 519a0b1bb2186a94b213c871cbf597950fc53a08 @meineerde meineerde committed Mar 31, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 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}"

0 comments on commit 519a0b1

Please sign in to comment.