From fe8a0c0cad98ac8c30c2b29138e9d2d31fc1ab4d Mon Sep 17 00:00:00 2001
From: Sylvester Joosten <sjoosten@anl.gov>
Date: Sat, 12 Jun 2021 23:41:52 +0000
Subject: [PATCH] move shell setup outside of profile.d

---
 containers/jug/Dockerfile.dev                       |  2 +-
 containers/jug/eic-env.sh                           | 13 +++++++++++++
 .../jug/profile.d/{a00_setup.sh => a00_cleanup.sh}  | 13 -------------
 3 files changed, 14 insertions(+), 14 deletions(-)
 rename containers/jug/profile.d/{a00_setup.sh => a00_cleanup.sh} (68%)

diff --git a/containers/jug/Dockerfile.dev b/containers/jug/Dockerfile.dev
index a56e3d940..f143f2ed3 100644
--- a/containers/jug/Dockerfile.dev
+++ b/containers/jug/Dockerfile.dev
@@ -194,7 +194,7 @@ COPY eic-shell /usr/local/bin/eic-shell
 COPY eic-info /usr/local/bin/eic-info
 COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
 COPY eic-env.sh /etc/eic-env.sh
-COPY profile.d/a00_setup.sh /etc/profile.d
+COPY profile.d/a00_cleanup.sh /etc/profile.d
 COPY profile.d/z11_jug_env.sh /etc/profile.d
 COPY singularity.d /.singularity.d
 
diff --git a/containers/jug/eic-env.sh b/containers/jug/eic-env.sh
index c540db1db..28d42a50d 100755
--- a/containers/jug/eic-env.sh
+++ b/containers/jug/eic-env.sh
@@ -3,3 +3,16 @@
 for i in /etc/profile.d/*.sh; do
   source $i
 done
+
+export PS1='eic-shell> \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33'
+export GREP_OPTIONS='--color=auto'
+
+function ls {
+    /bin/ls --color=auto
+  }
+function less {
+    /usr/bin/less -RAW_CONTROL_CHARS
+  }
+export -f ls
+export -f less
diff --git a/containers/jug/profile.d/a00_setup.sh b/containers/jug/profile.d/a00_cleanup.sh
similarity index 68%
rename from containers/jug/profile.d/a00_setup.sh
rename to containers/jug/profile.d/a00_cleanup.sh
index eec128f83..529ae7269 100755
--- a/containers/jug/profile.d/a00_setup.sh
+++ b/containers/jug/profile.d/a00_cleanup.sh
@@ -14,16 +14,3 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 [ ! -z "$CMAKE_PREFIX_PATH" ] && unset CMAKE_PREFIX_PATH
 [ ! -z "$SOFTWARE_HOME" ] && unset SOFTWARE_HOME
 [ ! -z "$ROOTSYS" ] && unset ROOTSYS
-
-export PS1='eic-shell> \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
-export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33'
-export GREP_OPTIONS='--color=auto'
-
-function ls {
-    /bin/ls --color=auto
-  }
-function less {
-    /usr/bin/less -RAW_CONTROL_CHARS
-  }
-export -f ls
-export -f less
-- 
GitLab