diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-05 23:03:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-05 23:03:42 +1200 |
commit | 60f32a4e6e55834f91edb048926763777cb7b6b8 (patch) | |
tree | 504f8381ca844c51136825ef1764a506a8c97736 /bash/bash_profile | |
parent | Refactored bashrc a bit (diff) | |
download | dotfiles-60f32a4e6e55834f91edb048926763777cb7b6b8.tar.gz dotfiles-60f32a4e6e55834f91edb048926763777cb7b6b8.zip |
Completely redo bash startup files
Much happier with things now. Conditionals are much more sensible and
colours are good too. I still don't like those ls and grep calls but I'd
rather put up with the ugliness.
This script takes about 200ms to load -- a bit too long really, but I
suspect that it might actually be the SSH agent stuff that's causing
trouble.
Diffstat (limited to 'bash/bash_profile')
-rw-r--r-- | bash/bash_profile | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/bash/bash_profile b/bash/bash_profile index c95bc9b0..99aad4ff 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,19 +1,10 @@ -# If running Bash, source .bashrc. -if [ -n "$BASH_VERSION" ]; then - if [ -e "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi -fi +# Source .bashrc if it exists. +[[ -e "$HOME/.bashrc" ]] && source "$HOME/.bashrc" -# Add ~/bin to the path if it exists. -if [ -d "$HOME/bin" ]; then - PATH="$HOME/bin:$PATH" -fi - -# Add machine-specific local file if it exists. -if [ -e "$HOME/.bash_local" ]; then - . "$HOME/.bash_local" -fi +# Add various paths if they exit. +[[ -d "${HOME}/bin" ]] && PATH="${HOME}/bin:${PATH}" +[[ -d "/usr/local/mysql/bin" ]] && PATH="/usr/local/mysql/bin:${PATH}" +[[ -d "/usr/local/pgsql/bin" ]] && PATH="/usr/local/pgsql/bin:${PATH}" # None of this UTF8 drawing characters nonsense. export NCURSES_NO_UTF8_ACS=1 |