diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-07-31 17:26:30 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-07-31 17:26:30 +1200 |
commit | f5ed4cd090b321064039441e40fe46a6995abf9a (patch) | |
tree | 371166922ae8e079eca565322496068d658b00ba /bash/bash_profile | |
parent | Place missing quotes (diff) | |
download | dotfiles-f5ed4cd090b321064039441e40fe46a6995abf9a.tar.gz dotfiles-f5ed4cd090b321064039441e40fe46a6995abf9a.zip |
Use standard structure for if/for in shell
Mostly for clarity reasons; using this syntax:
if [ condition ]; then
commands
fi
As opposed to:
if [ condition ]
then
commands
fi
Or:
[ condition ] && command
Diffstat (limited to 'bash/bash_profile')
-rw-r--r-- | bash/bash_profile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bash/bash_profile b/bash/bash_profile index aa87667d..3b391209 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,6 +1,10 @@ # Source Bourne shell profile if it exists -[[ -r "$HOME/.profile" ]] && source $HOME/.profile +if [[ -r "$HOME/.profile" ]]; then + source $HOME/.profile +fi # Source interactive Bash config if it exists -[[ -r "$HOME/.bashrc" ]] && source $HOME/.bashrc +if [[ -r "$HOME/.bashrc" ]]; then + source $HOME/.bashrc +fi |