aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-17 19:41:44 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-17 19:41:44 +1200
commit96712c2e2e39e979a2c7625f5fca57a4e06d4c98 (patch)
tree376112db96a7bc7cfb75a6cf617a21cddc5e1037 /sh
parentUse terser loop syntax in ~/.bash_profile (diff)
downloaddotfiles-96712c2e2e39e979a2c7625f5fca57a4e06d4c98.tar.gz
dotfiles-96712c2e2e39e979a2c7625f5fca57a4e06d4c98.zip
Handle setting ENV from ~/.profile
Diffstat (limited to 'sh')
-rw-r--r--sh/profile7
1 files changed, 4 insertions, 3 deletions
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