X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bash%2Frc;h=e0563a93942dbe0d4b2ba15264874185c1508356;hb=cf7bcb6763d5a0643124f6f2fe6b238be634829b;hp=455ce0dd0eeb32b610cce470a374246cd0e99d61;hpb=932f6438bf1c0f658550841e04ab9a22f2590773;p=config%2Fdotfiles.git diff --git a/bash/rc b/bash/rc index 455ce0d..e0563a9 100644 --- a/bash/rc +++ b/bash/rc @@ -8,3 +8,13 @@ export LC_ALL=en_US.UTF-8 export EDITOR='vim' # Use Vi(m) style in bash. set -o vi + + +# If a rc.local file exists load it, otherwise load a rc file for the current +# hostname (first part before a dot) if it exists. +host=$(echo $(hostname) | sed -e 's/\..*$//') +if [ -f ~/.bash/rc.local ]; then + source ~/.bash/rc.local +elif [ -f ~/.bash/rc.$host ]; then + source ~/.bash/rc.$host +fi