diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2016-07-20 15:42:41 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2016-07-20 15:42:41 -0400 |
commit | de413e7ae293f2b919e2e75369c1ecb8a0c83975 (patch) | |
tree | 143ea097ea9e740c48b62335d468e9b0543be7b3 /include/midnight_special.sh | |
download | astroconda-control-de413e7ae293f2b919e2e75369c1ecb8a0c83975.tar.gz |
Initial commit
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 |