-
Notifications
You must be signed in to change notification settings - Fork 0
/
.profile
68 lines (59 loc) · 1.34 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
settings_history() {
#set history behavor
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
alias h="history"
}
settings_homebrew() { # Homebrew
if [ -d $HOME/homebrew ] ; then # alternative location
export PATH=$HOME/homebrew/bin:$HOME/homebrew/sbin:$PATH
fi
if [ -d /usr/local/bin ] ; then # default location
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
fi
}
settings_macports() { # MacPorts
if [ -d $HOME/macports ] ; then # alternative location
export PATH=$HOME/macports/bin:$HOME/macports/sbin:$PATH
export MANPATH=$HOME/macports/share/man:$MANPATH
fi
}
settings_anaconda() { # Anaconda
if [ -d $HOME/anaconda/bin ] ; then
export PATH=$HOME/anaconda/bin:$PATH
fi
}
settings_perlbrew() { # perlbrew
if [ -d $HOME/perl5/perlbrew ] ; then
export PERLBREW_ROOT=$HOME/perl5/perlbrew
source ${PRELBREW_ROOT}/etc/bashrc
perlbrew switch perl-5.20.1
fi
}
settings_personal() { # my personal stuff
export PATH=$HOME/bin:$PATH
}
case `uname` in
Darwin)
echo OSX
settings_history
settings_homebrew
settings_macports
settings_anaconda
settings_perlbrew
settings_personal
;;
FreeBSD)
echo FreeBSD
settings_personal
;;
Linux)
echo Linux
settings_history
settings_personal
;;
*)
echo unknown OS
;;
esac