-
Notifications
You must be signed in to change notification settings - Fork 0
/
.profile
86 lines (76 loc) · 1.15 KB
/
.profile
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
EDITOR=vi
VISUAL=vi
export EDITOR VISUAL
if [ -x /usr/bin/more ]
then
PAGER=more
else
PAGER=less
LESS="-X -R -F"
export LESS
fi
export PAGER
if [ -z "$LANG" ]
then
LANG="en_US.UTF-8"
export LANG
fi
if [ -d "$HOME/bin" ]
then
case "$PATH" in
$HOME/bin:*|$HOME\\bin:*)
;;
*:$HOME/bin*|*:$HOME\\bin*)
PATH="$HOME/bin:`echo $PATH | sed \"s|:$HOME[/\\]bin||g\"`"
;;
*)
PATH="$HOME/bin:$PATH"
;;
esac
export PATH
fi
if [ -f "$HOME/.signature" ]
then
sign=`cat "$HOME/.signature"`
export sign
fi
if [ -f "$HOME/.shrc" ]
then
ENV="$HOME/.shrc"
export ENV
fi
case "`uname 2> /dev/null`" in
MINGW*|Darwin)
TERM=xterm-256color
;;
*)
TERM=xterm
;;
esac
export TERM
case "`hostname 2> /dev/null`" in
sdf)
MAIL=/mail/${LOGNAME:?}
export MAIL
;;
*)
;;
esac
case "$-" in
*i*)
PS1='$ '
PS2='> '
PS3='#? '
PS4='+ '
export PS1 PS2 PS3 PS4
if [ -x "`command -v fortune`" ]
then
`command -v fortune`
elif [ -f "$HOME/tmp/fortunes" -a -f "$HOME/tmp/fortunes.count" ]
then
awk 'BEGIN { srand(); x=int(rand() * '`cat "$HOME/tmp/fortunes.count"`') } /^%$/ { x--;next } x==0' "$HOME/tmp/fortunes"
fi
;;
*)
;;
esac