Ruby on Rails: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==Ruby » RVM==
<source lang="bash">
for PROFILE_NAME in .bash_profile .bashrc .mkshrc .profile .zlogin .zshrc;do
    if  [[ -e ${HOME}/${PROFILE_NAME} ]]&&[[ -s ${HOME}/${PROFILE_NAME} ]]&&
        [[ "$(grep -c '${HOME}/.rvm/scripts/rvm' ${HOME}/${PROFILE_NAME})" == 0 ]];then
            tee -a ${HOME}/${PROFILE_NAME} >/dev/null <<'EOF'
# load rvm into a shell session
if  [[ ! "${PATH}" =~ "${HOME}/.rvm/bin:" ]]&&
    [[ -x "${HOME}/.rvm/scripts/rvm" ]];then
    export PATH=${HOME}/.rvm/bin:${PATH}
    source ${HOME}/.rvm/scripts/rvm
fi
EOF
    fi
done
</source>
==References==
==References==
{|
{|

Revision as of 22:01, 11 March 2023

Ruby » RVM

for PROFILE_NAME in .bash_profile .bashrc .mkshrc .profile .zlogin .zshrc;do
    if  [[ -e ${HOME}/${PROFILE_NAME} ]]&&[[ -s ${HOME}/${PROFILE_NAME} ]]&&
        [[ "$(grep -c '${HOME}/.rvm/scripts/rvm' ${HOME}/${PROFILE_NAME})" == 0 ]];then
            tee -a ${HOME}/${PROFILE_NAME} >/dev/null <<'EOF'

# load rvm into a shell session
if  [[ ! "${PATH}" =~ "${HOME}/.rvm/bin:" ]]&&
    [[ -x "${HOME}/.rvm/scripts/rvm" ]];then

    export PATH=${HOME}/.rvm/bin:${PATH}
    source ${HOME}/.rvm/scripts/rvm
fi
EOF
    fi
done

References