Skip to content

Commit

Permalink
Lookup shell from running binary on systems with a /proc fs
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed Sep 6, 2012
1 parent eb8473a commit fa05ab5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/functions/installer
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,16 @@ setup_etc_profile()
# /etc/profile.d/rvm.sh # sh extension required for loading.
#
if test -d /proc
then
shell=\$(basename \$(readlink -f /proc/\$\$/exe))
else
shell=\"\`ps -p \$\$ -o comm=\`\"
fi
if [ -n \"\${BASH_VERSION:-}\" -o -n \"\${ZSH_VERSION:-}\" ] &&
test \"\`ps -p \$\$ -o comm=\`\" != dash &&
test \"\`ps -p \$\$ -o comm=\`\" != sh
test \"\$shell\" != dash &&
test \"\$shell\" != sh
then
: rvm_stored_umask:\${rvm_stored_umask:=\$(umask)}
Expand Down

0 comments on commit fa05ab5

Please sign in to comment.