If there is .bashrc but no .bash_profile, recommend the former

This is for Linux desktop platforms that have Terminal application
configured to start shells in interactive but not login mode. Creating a
`~/.bash_profile` would also cause `~/.profile` to not run, which might
be a problem on Ubuntu which ships with a default `~/.profile`.
This commit is contained in:
Mislav Marohnić 2015-10-26 15:45:52 +01:00
parent 074161f9c1
commit 6913fee89a

View file

@ -34,7 +34,11 @@ root="${0%/*}/.."
if [ -z "$print" ]; then
case "$shell" in
bash )
profile='~/.bash_profile'
if [ -f "${HOME}/.bashrc" ] && [ ! -f "${HOME}/.bash_profile" ]; then
profile='~/.bashrc'
else
profile='~/.bash_profile'
fi
;;
zsh )
profile='~/.zshrc'