From: Simon Ruderich Date: Sun, 21 Sep 2008 15:36:54 +0000 (+0200) Subject: First load the bash file for this hostname, then rc.local. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=68d93351ef40b729ca285b8de94a6b316e761ad8;p=config%2Fdotfiles.git First load the bash file for this hostname, then rc.local. This change is the bash part of 2f24b0aebdd38599256c21b82ee7b39fe5ad0963. --- diff --git a/bash/rc b/bash/rc index e0563a9..3874363 100644 --- a/bash/rc +++ b/bash/rc @@ -10,11 +10,11 @@ export EDITOR='vim' 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. +# If a rc file for the current hostname (first part before a dot) exists load +# it, otherwise load rc.local if available. host=$(echo $(hostname) | sed -e 's/\..*$//') -if [ -f ~/.bash/rc.local ]; then - source ~/.bash/rc.local -elif [ -f ~/.bash/rc.$host ]; then +if [ -f ~/.bash/rc.$host ]; then source ~/.bash/rc.$host +elif [ -f ~/.bash/rc.local ]; then + source ~/.bash/rc.local fi