From 86dc3db1a13619020fce4193bf203ab74bb0eaa3 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 26 Feb 2019 12:33:54 +1100 Subject: [PATCH] source bash_profile from bashrc --- bash_profile.sh | 1 - bashrc.sh | 16 +++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/bash_profile.sh b/bash_profile.sh index bcd2fa3..14eafdf 100755 --- a/bash_profile.sh +++ b/bash_profile.sh @@ -1,7 +1,6 @@ SELF="$(realpath "${BASH_SOURCE[0]}")" DIR="$(cd "$(dirname "${SELF}")"; pwd -P)" -source "${DIR}/bashrc.sh" for d in $(ls "${DIR}"/*/profile); do source "${d}" diff --git a/bashrc.sh b/bashrc.sh index 34dbd8c..77588b0 100755 --- a/bashrc.sh +++ b/bashrc.sh @@ -1,11 +1,3 @@ -# /etc/skel/.bashrc -# -# This file is sourced by all *interactive* bash shells on startup, -# including some apparently interactive shells such as scp and rcp -# that can't tolerate any output. So make sure this doesn't display -# anything or bad things will happen ! - - # Test for an interactive shell. There is no need to set anything # past this point for scp and rcp, and it's important to refrain from # outputting anything in those cases. @@ -15,4 +7,10 @@ if [[ $- != *i* ]] ; then fi -# Put your fun stuff here. +if [ -f /etc/profile ]; then + source /etc/profile +fi + +if [ -f ~/.bash_profile ]; then + source ~/.bash_profile +fi