From 96712c2e2e39e979a2c7625f5fca57a4e06d4c98 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 17 Aug 2016 19:41:44 +1200 Subject: Handle setting ENV from ~/.profile --- sh/profile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 78fbd2cc..aced40c2 100644 --- a/sh/profile +++ b/sh/profile @@ -10,7 +10,8 @@ for profile in "$HOME"/.profile.d/*.sh ; do done unset -v profile -# If ~/.shrc exists, source that too; the test for interactivity is in there -if [ -f "$HOME"/.shrc ] ; then - source "$HOME"/.shrc +# If ENV is unset after running those scripts and ~/.shrc exists, set it as ENV +if [ -z "$ENV" ] && [ -f "$HOME"/.shrc ] ; then + ENV=$HOME/.shrc + export ENV fi -- cgit v1.2.3