diff --git a/containers/jug/eic-env.sh b/containers/jug/eic-env.sh index 2475ddca1586bc71ab8c156df98d01aa50844f33..f320442cb31b13b214b0fbe69b7318551634d9c9 100755 --- a/containers/jug/eic-env.sh +++ b/containers/jug/eic-env.sh @@ -1,7 +1,7 @@ #!/bin/bash for i in /etc/profile.d/*.sh; do - source $i + . $i done export PS1='eic-shell> \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' @@ -10,13 +10,13 @@ export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33' ## redefine ls and less as functions, as this is something we ## can import into our plain bash --norc --noprofile session ## (aliases cannot be transferred to a child shell) -function ls { +ls () { /bin/ls --color=auto $@ } -function less { +less () { /usr/bin/less -R $@ } -function grep { +grep () { /bin/grep --color=auto $@ } MYSHELL=$(ps -p $$ | awk '{print($4);}' | tail -n1) @@ -24,7 +24,7 @@ MYSHELL=$(ps -p $$ | awk '{print($4);}' | tail -n1) ## in all shells and we only care about bash here. Note that ## the singularity startup runs in plain sh which requires the ## if statement -if [ "$MYSHELL" == "bash" ]; then +if [ "$MYSHELL" = "bash" ]; then export -f ls export -f less export -f grep diff --git a/containers/jug/eic-shell b/containers/jug/eic-shell index 1a4a7612a300cb7faef6da88e8e41ea75a8274e4..e31800377aca33ad626c7d0bc005def450e896f0 100755 --- a/containers/jug/eic-shell +++ b/containers/jug/eic-shell @@ -9,7 +9,7 @@ if [ -p /dev/stdin ]; then fi ## Properly setup environment -source /etc/eic-env.sh +. /etc/eic-env.sh ### Fire off bash diff --git a/containers/jug/entrypoint.sh b/containers/jug/entrypoint.sh index a69c40d97a514040c4e0eeadb697e0e2c36b3360..79465dce13d8ae1a4dae4a12de02987efe522f41 100755 --- a/containers/jug/entrypoint.sh +++ b/containers/jug/entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ## Force environment to be clean -source /etc/eic-env.sh +. /etc/eic-env.sh exec "$@" diff --git a/containers/jug/singularity.d/env/99-zz_jug_env.sh b/containers/jug/singularity.d/env/99-zz_jug_env.sh index d3d3d3749dff29be19b2b91b87ee45f9676ae1d4..ab161b0b58b7177d573431d41dfbb97134147d95 100755 --- a/containers/jug/singularity.d/env/99-zz_jug_env.sh +++ b/containers/jug/singularity.d/env/99-zz_jug_env.sh @@ -1,3 +1,3 @@ #!/bin/bash -source /etc/eic-env.sh +. /etc/eic-env.sh