From 09bc29e2dbeadc811491f555e71397dfa0264704 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 18 Dec 2016 12:54:48 +1300 Subject: Change tack; force ENV if the file exists --- Makefile | 2 -- ksh/profile.d/ksh.sh | 6 ------ sh/profile | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 ksh/profile.d/ksh.sh diff --git a/Makefile b/Makefile index 739b8462..9961da71 100644 --- a/Makefile +++ b/Makefile @@ -292,10 +292,8 @@ install-mysql : install-ksh : check-ksh install-sh install -m 0755 -d -- \ - "$(HOME)"/.profile.d \ "$(HOME)"/.shrc.d \ "$(HOME)"/.kshrc.d - install -pm 0644 -- ksh/profile.d/* "$(HOME)"/.profile.d install -pm 0644 -- ksh/shrc.d/* "$(HOME)"/.shrc.d install -pm 0644 -- ksh/kshrc "$(HOME)"/.kshrc install -pm 0644 -- ksh/kshrc.d/* "$(HOME)"/.kshrc.d diff --git a/ksh/profile.d/ksh.sh b/ksh/profile.d/ksh.sh deleted file mode 100644 index 61626b1a..00000000 --- a/ksh/profile.d/ksh.sh +++ /dev/null @@ -1,6 +0,0 @@ -# If ksh93 as a login shell decided to give ENV a bizarre value, quietly shunt -# it out of the way. This is probably not how I'm supposed to do this, but I -# can't find documentation as to why ksh93 chooses this value. -case $ENV in - .sh.ENV) [ -f "$ENV" ] || unset ENV ;; -esac diff --git a/sh/profile b/sh/profile index fd87b8fa..5d9c80bf 100644 --- a/sh/profile +++ b/sh/profile @@ -7,8 +7,8 @@ for sh in "$HOME"/.profile.d/*.sh ; do done unset -v sh -# If ENV is still unset, and ~/.shinit exists, use that -if [ -z "$ENV" ] && [ -f "$HOME"/.shinit ] ; then +# If ~/.shinit exists, set ENV to that +if [ -f "$HOME"/.shinit ] ; then ENV=$HOME/.shinit export ENV fi -- cgit v1.2.3