Fix issue 268. Set PROFILE to .bashrc in case of ubuntu.

This commit is contained in:
theme 2013-10-14 19:04:02 +08:00
parent d3f04c793e
commit df80f6a80c
2 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,9 @@ popd > /dev/null
if [ ! -z "$1" ]; then
PROFILE="$1"
else
if [ -f "$HOME/.bash_profile" ]; then
if [ -f "$HOME/.bashrc" ]; then
PROFILE="$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
PROFILE="$HOME/.bash_profile"
elif [ -f "$HOME/.profile" ]; then
PROFILE="$HOME/.profile"

View File

@ -23,7 +23,9 @@ echo
if [ ! -z "$1" ]; then
PROFILE="$1"
else
if [ -f "$HOME/.bash_profile" ]; then
if [ -f "$HOME/.bashrc" ]; then
PROFILE="$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
PROFILE="$HOME/.bash_profile"
elif [ -f "$HOME/.profile" ]; then
PROFILE="$HOME/.profile"