-
Notifications
You must be signed in to change notification settings - Fork 1
/
_bashrc
executable file
·58 lines (45 loc) · 1.45 KB
/
_bashrc
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
# .bashrc
# User specific aliases and functions
# Source global definitions
#if [ -f /etc/bashrc ]; then
# . /etc/bashrc
#fi
export LANG=zh_CN.UTF-8
# [email protected]:~/workspace
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[01;31m\]@\[\033[01;36m\]\H\[\033[01;31m\]:\[\e[33m\]\w\[\e[0m\]\n\$ "
# [email protected]:/home/worker/workspace
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[01;31m\]@\[\033[01;36m\]\H\[\033[01;31m\]:\[\e[33m\]\`pwd\`\[\e[0m\]\n\$ "
#PAT=H/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/share/baidu/bin:$PATH
### for user app
function export_app_path() {
APP_PATH=$1
if [ ! -d ${APP_PATH} ]; then
return
fi
if [ -d ${APP_PATH}/bin ]; then
export PATH=${APP_PATH}/bin:${PATH}
fi
if [ -d ${APP_PATH}/sbin ]; then
export PATH=${APP_PATH}/sbin:${PATH}
fi
if [ -d ${APP_PATH}/include ]; then
export INCLUDE_PATH=${APP_PATH}/include:${INCLUDE_PATH}
fi
if [ -d ${APP_PATH}/lib ]; then
export LD_LIBRARY_PATH=${APP_PATH}/lib:${LD_LIBRARY_PATH}
fi
}
function export_usr_apps() {
USER_APPS_DIR=$1
if [ -d ${USER_APPS_DIR} ]; then
for app_path in ${USER_APPS_DIR}/*
do
export_app_path ${app_path}
done
fi
}
export_usr_apps ${HOME}/local
#### for svn
#if [ -f $HOME/bin/diffwrap.sh ]; then
# alias svndiff='svn di --diff-cmd=$HOME/bin/diffwrap.sh'
#fi