-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.shrc
121 lines (101 loc) · 2.84 KB
/
.shrc
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/sh
# Set default editor to vim
export EDITOR="vim"
# tell bash that we want to use the 256 color terminal
export TERM=screen-256color;
# Check if ${HOME}/.bin/ exists
if [ -d "${HOME}/.bin/" ]
then
# add my ${HOME}/bin to the path
export PATH=$PATH":${HOME}/.bin/"
fi
# Check if ${HOME}/.sdks/android/tools/ exists
if [ -d "${HOME}/.sdks/android/tools/" ]
then
# add my android tools to the path
export PATH=$PATH":${HOME}/.sdks/android/tools/"
fi
# Check if ${HOME}/.sdks/android/platform-tools/ exists
if [ -d "${HOME}/.sdks/android/platform-tools/" ]
then
# add my android platform tools to the path
export PATH=$PATH":${HOME}/.sdks/android/platform-tools/"
fi
# Check if ${HOME}/.composer/vendor/bin/ exists
if [ -d "${HOME}/.composer/vendor/bin/" ]
then
# Add GLOBAL composer to PATH so we can use it in BASH!
export PATH=$PATH":${HOME}/.composer/vendor/bin/"
fi
# Check if ${HOME}/.sdks/android/ exists
if [ -d "${HOME}/.sdks/android/" ]
then
# add my android sdk as ANDROID_HOME so that android studio will work nicely
export ANDROID_HOME="${HOME}/.sdks/android/"
fi
# Check if we have java 7...
if [ -d "/usr/lib/jvm/java-7-openjdk-amd64/" ]
then
# JAVA! WHERE DO YOU LIVE?
export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/"
fi
# Check if we have java 8...
if [ -d "/usr/lib/jvm/java-8-openjdk-amd64/" ]
then
# JAVA! WHERE DO YOU LIVE?
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
fi
# Aliases to enable color support for these
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Check if we have an .deb based system
if [ $(command -v apt-get) ]
then
# Alias for system package manager
alias mxpacman='sudo apt-get'
fi
# Check if we have an .rpm based system
if [ $(command -v yum) ]
then
# Alias for system package manager
alias mxpacman='sudo yum'
fi
# Check if we have a pact based system
if [ $(command -v pact) ]
then
# Alias for system package manager
alias mxpacman='pact'
fi
# Some system package management aliases
alias mxupdate='mxpacman update'
alias mxinstall='mxpacman install'
alias mxupgrade='mxpacman upgrade'
alias mxdistupgrade='mxpacman dist-upgrade'
alias mxautoclean='mxpacman autoclean'
alias mxautoremove='mxpacman autoremove'
# Alias for our mxmaintenance helper
alias mxmaintenance='mxupgrade -y'
# Check if we have an .deb based system
if [ $(command -v apt-get) ]
then
# Alias for our mxmaintenance helper
alias mxmaintenance='mxupdate && mxupgrade -y && mxdistupgrade -y && mxautoclean -y && mxautoremove -y'
fi
# load up the custom CLI PROMPT
if [ -f ~/.promptline.sh ]
then
source ~/.promptline.sh
fi
# load the rails bash configs
if [ -f /etc/profile.d/rvm.sh ]
then
source /etc/profile.d/rvm.sh
fi