]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
First load the bash file for this hostname, then rc.local.
authorSimon Ruderich <simon@ruderich.org>
Sun, 21 Sep 2008 15:36:54 +0000 (17:36 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 16 Feb 2009 15:33:03 +0000 (16:33 +0100)
This change is the bash part of 2f24b0aebdd38599256c21b82ee7b39fe5ad0963.

bash/rc

diff --git a/bash/rc b/bash/rc
index e0563a93942dbe0d4b2ba15264874185c1508356..3874363eea7dacec14f3a0b5cfe030f6ca62b549 100644 (file)
--- 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