summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Newson <jon_newson@ieee.org>2016-03-04 10:59:07 +1100
committerJon Newson <jon_newson@ieee.org>2016-03-06 16:46:24 +1100
commit5bf92fac1a709b336e44e29d53981b9953cdccbe (patch)
tree912e6d94d696de260c4176455b01946cf4247c7a
parent55b0390eaee7d2a4b66900e7a1fddf1a286ff834 (diff)
Determine user's configured shell then set variable accordingly. #624
-rwxr-xr-xosx_setup.sh25
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 {