diff options
author | Jon Newson <jon_newson@ieee.org> | 2016-03-04 10:59:07 +1100 |
---|---|---|
committer | Jon Newson <jon_newson@ieee.org> | 2016-03-06 16:46:24 +1100 |
commit | 5bf92fac1a709b336e44e29d53981b9953cdccbe (patch) | |
tree | 912e6d94d696de260c4176455b01946cf4247c7a | |
parent | 55b0390eaee7d2a4b66900e7a1fddf1a286ff834 (diff) |
Determine user's configured shell then set variable accordingly. #624
-rwxr-xr-x | osx_setup.sh | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/osx_setup.sh b/osx_setup.sh index 2103d765..c58270c7 100755 --- a/osx_setup.sh +++ b/osx_setup.sh @@ -3,23 +3,28 @@ # Test to make sure we are OSX if [ $(uname) != 'Darwin' ] then - echo "This script should run only on an OSX system!" - exit 1 + echo "This script should run only on an OSX system!" + exit 1 fi # Read the shell configured for the user and set the variable file accordingly function current_shell { - case $SHELL in - *bash) - echo ~/.bash_profile - ;; + case $SHELL in + *bash) + echo ~/.bash_profile + ;; - *zsh) - echo ~/.zshrc - ;; + *zsh) + echo ~/.zprofile + ;; + + /bin/sh + echo ~/.profile + ;; + #Other shells can go here - esac + esac } function install_compass { |