fix btrbk service
[distro-setup] / .bashrc
diff --git a/.bashrc b/.bashrc
index 7db792c3448da92d3e929ea4e04c76c513bd2637..097dd9859413d0f9c5640e12908726d579bfdd29 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -51,8 +51,16 @@ if [[ $SSH_CONNECTION ]] \
        && [[ ! $SSH_TTY ]] \
        && [[ $- != *i* ]] \
        && [[ ! $BASH_LOGIN_SHELL == true ]]; then
-    return
+    return 0
 else
-    source /etc/profile
-    source ~/brc
+    if [[ -r /etc/profile ]]; then
+        source /etc/profile
+    fi
+    _x=$(readlink -f $BASH_SOURCE)
+    _x=${_x%/*}/brc
+    if [[ -r $_x ]]; then
+        source $_x
+    fi
 fi
+# ensure no bad programs appending to this file will have an affect
+return 0