From 275f564efe0168d50135e1d6d7d26b916b936b12 Mon Sep 17 00:00:00 2001 From: Jon Newson Date: Fri, 4 Mar 2016 10:59:07 +1100 Subject: Determine user's configured shell then set variable accordingly. #624 --- osx_setup.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'osx_setup.sh') 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 { -- cgit v1.2.3