From 60f32a4e6e55834f91edb048926763777cb7b6b8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 5 Jun 2012 23:03:42 +1200 Subject: 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. --- bash/bash_profile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'bash/bash_profile') 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 -- cgit v1.2.3