Dan, on line 9 I think you want to pipe to ~/.zshrc.
Also, you can try using $0 to get the current prompt. I think that would be what you want, as $SHELL returns /bin/bash for me even I'm running zsh (but I didn't chsh)
$0 for bash will return bash, and $0 for zsh will return -zsh (not sure about the leading hyphen.)
if [ $0 -eq '-zsh' ]
also check this thread: http://stackoverflow.com/questions/9910966/how-to-tell-if-its-using-zsh-or-bash
What if divide this two script into one for bash and another one for zsh (Exact same script except zshrc->bashrc). And in the README.md tell the bash user to grab bash one, and vice versa. Maybe a simple solution to avoid possible error occurs.
I'm a fan of:
if [ -n "$ZSH_VERSION" ]; then
elif [ -n "$BASH_VERSION" ]; then
zsh does not always load ~/.profile, so I wouldn't depend on that.
And, as always, I question whether this script you're writing needs to be a bash script instead of normal POSIX.
This is probably just test code, but careful on line 6: you're missing a path separator