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-04 10:59:07 +1100 |
commit | 275f564efe0168d50135e1d6d7d26b916b936b12 (patch) | |
tree | 2f1ea3482e192d2f3771e882d2b20559f9b63adb /osx_setup.sh | |
parent | 9f467ef8bfd85921d310976e8554af119f7f0341 (diff) |
Determine user's configured shell then set variable accordingly. #624
Diffstat (limited to 'osx_setup.sh')
-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 { |