Created
October 1, 2020 21:23
-
-
Save ninapavlich/90c3142a445e9258687666295d46ff0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Try to get the profile path | |
PROFILE_PATH='' | |
getProfilePath(){ | |
if [[ "$SHELL" == *"zsh"* ]]; then | |
PROFILE_PATH=$HOME/'.zshrc' | |
elif [[ "$SHELL" == *"bash"* ]]; then | |
if [ -f $HOME/.bashrc ]; then | |
PROFILE_PATH=$HOME/'.bashrc' | |
elif [ -f $HOME/.profile ]; then | |
PROFILE_PATH=$HOME/'.profile' | |
elif [ -f $HOME/.bash_profile ]; then | |
PROFILE_PATH=$HOME/'.bash_profile' | |
fi | |
fi | |
} | |
getProfilePath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment