Skip to content

Commit

Permalink
better shell etection
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Oct 3, 2012
1 parent dd41a3d commit 92b1c46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dist/resources/pkg/postinstall
@@ -1,15 +1,17 @@
#!/bin/sh

usershell=$(dscl localhost -read /Local/Default/Users/$USER shell | sed -e 's/[^ ]* //')

# determine proper startup scripts per-shell
case $(basename $SHELL) in
case $(basename $usershell) in
zsh)
startup_files=".zlogin .zshrc .zprofile .zshenv"
;;
bash)
startup_files=".bash_profile .bash_login .profile"
;;
*)
startup_files=""
startup_files=".bash_profile .zshrc .profile"
;;
esac

Expand Down

0 comments on commit 92b1c46

Please sign in to comment.