summaryrefslogtreecommitdiff
path: root/include/midnight_special.sh
blob: 5781588aaaecb5a0c63b10312c20042147be5615 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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