diff options
Diffstat (limited to 'include/midnight_special.sh')
-rwxr-xr-x | include/midnight_special.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/midnight_special.sh b/include/midnight_special.sh new file mode 100755 index 0000000..5781588 --- /dev/null +++ b/include/midnight_special.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Yeah, we're not dealing with the existing environment. Too many things can go wrong here. +# DROP EVERYTHING and start fresh in a different home directory +source /eng/ssb/auto/astroconda/include/host_config.sh + +#[[ "$USER" != "" ]] && exec -c $0 +export sm_base="$PWD" + +unset $(/usr/bin/env \ + | egrep '^(\w+)=(.*)$' \ + | egrep -vw 'SHLVL|USER|LANG|sm_run|sm_node|sm_logs|sm_base|node_dir|workdir|hostname' \ + | /usr/bin/cut -d= -f1) +export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin +export HOME=$NEW_HOME +export TERM=xterm +source /etc/profile +source /etc/bashrc +#printenv |