-
Notifications
You must be signed in to change notification settings - Fork 11
/
shell-detect
52 lines (44 loc) · 943 Bytes
/
shell-detect
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
case $OSTYPE in
darwin*)
export SHELL_PLATFORM="osx"
;;
solaris*)
export SHELL_PLATFORM="solaris"
;;
*) # anything else
export SHELL_PLATFORM="linux"
;;
esac
case $TERM in
xterm-256color | xterm-color)
color_prompt=yes
;;
esac
unset SHELL_GNOME
if which gconftool-2 > /dev/null; then
export SHELL_GNOME="yes"
fi
if [ -f ~/.ocf ]; then
export OCF=yes
else
export OCF=no
fi
if [ -d "$HOME/dev/projects" ]; then
if [ -z "$PYTHONPATH" ]; then
export PYTHONPATH="$HOME/dev/projects"
else
PYTHONPATH="$HOME/dev/projects:$PYTHONPATH"
fi
fi
if [ -z "$USELESS_TERM" ]; then
# are we connected from a useless (or not useless) term?
if [ -n "$LC_USELESS_TERM" ]; then
export USELESS_TERM="$LC_USELESS_TERM"
elif [ -f ~/.useless-term ]; then # are we assumed to be useless?
export USELESS_TERM=yes
else
export USELESS_TERM=no
fi
fi
# to be passed to anything we SSH into
export LC_USELESS_TERM="$USELESS_TERM"