-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc-trustonic
181 lines (152 loc) · 5.25 KB
/
bashrc-trustonic
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# -*- mode:shell-script -*-
set +o posix
function bashrc_trustonic_set_defaults(){
# ulimit -n 2048 -u 1024
if [[ $(uname) = Darwin ]] ; then
defaults write org.x.X11 enable_test_extensions -boolean true
defaults write org.macports.X11 enable_test_extensions -boolean true
fi
}
function bashrc_trustonic_filter_environment(){
local good_env=(COLUMNS
DBUS_SESSION_BUS_ADDRESS
DESKTOP_SESSION
DISPLAY
EDITOR
HOME
INPUTRC
LC_ALL
LC_CTYPE
LD_LIBRARY_PATH
LIBRARY_COMBO
LOGNAME
PAGER
PATH
PS1
PWD
PYTHONPATH
QT_XFT
REPLYTO
SESSION_MANAGER
SHELL
SHLVL
TERM
TZ
USER
USERNAME
VISUAL
XAUTHORITY
XDG_CURRENT_DESKTOP
XDG_DATA_DIRS
XDG_MENU_PREFIX
XDG_RUNTIME_DIR
XDG_SEAT
XDG_SESSION_DESKTOP
XDG_SESSION_ID
XDG_VTNR
GOTO_HOME
CLEAR_HOME
CLEAR_SCREEN)
function bashrc_trustonic_smallEnvironment(){
env | sort | while read varval ; do
var=${varval/=*}
if member "$var" "${good_env[@]}" >/dev/null 2>&1 ; then
echo "${var}='${varval/*=}'"
fi
done
}
function bashrc_trustonic_badEnvironment(){
env | sort | while read varval ; do
var=${varval/=*}
if ! member "$var" "${good_env[@]}" >/dev/null 2>&1 ; then
echo "${var}"
fi
done
}
function bashrc_trustonic_cleanEnvironment(){
bashrc_trustonic_badEnvironment | while read var ; do unset "${var}" ; done
}
grep -v -e "\<\($(joinWithSeparator "\|" $(badEnvironment))\)\>" \
< ~/.bash_env \
> ~/.bash_env_small \
&& mv ~/.bash_env_small ~/.bash_env
}
function bashrc_trustonic_set_environment(){
be_variable REPLYTO 'Pascal Bourguignon <pascal.bourguignon@trustonic.com>'
be_variable MAILHOST "localhost"
be_variable MAIL "/var/mail/$USER"
be_variable MAILPATH "${MAIL}" # ${MAIL}:/larissa/root/var/spool/mail/$USER
CYAN_BACK=""
MAGENTA_BACK=""
BLUE_BACK=""
YELLOW_BACK=""
GREEN_BACK=""
RED_BACK=""
BLACK_BACK=""
WHITE_BACK=""
WHITE=""
CYAN=""
MAGENTA=""
BLUE=""
YELLOW=""
GREEN=""
RED=""
BLACK=""
NO_INVERT=""
NO_BLINK=""
NO_UNDERLINE=""
NO_BOLD=""
INVERT=""
BLINK=""
UNDERLINE=""
BOLD=""
export GRADLE_HOME="/opt/local/share/java/gradle"
export REPLYTO='Pascal J. Bourguignon <pascal.bourguignon@trustonic.com>'
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export ANDROID_SDK="$HOME/Library/Android/sdk"
export ANDROID_HOME="$ANDROID_SDK"
export ANDROID_NDK="$ANDROID_SDK/ndk-bundle"
export PATH="$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:$PATH"
export PATH="/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH"
export PATH="$HOME/src/trustonic/bin:$PATH"
export PATH="$HOME/opt/bin:$PATH"
if [[ "$(uname)" = "Darwin" ]] ; then
export JAVA_HOME="$(/usr/libexec/java_home)"
else
export JAVA_HOME=/usr/lib/jvm/default-java/jre
fi
export LM_LICENSE_FILE="8224@emea-meu-lic01.trustonic.internal"
export DELIVERY="no"
export OBFUSCATE="no"
export OBFUSCATE_TA="no"
export REALLY_I_SHOULD_NOT_BUT_I_AM_IN_A_HURRY_AND_I_CANNOT_DEAL_WITH_WARNING_AS_ERRORS_RIGHT_NOW=yes
export LM_LICENSE_FILE="8224@emea-meu-lic01.trustonic.internal"
export OBFUSCATE="no"
}
function bashrc_trustonic_define_functions(){
alias from-mb='rsynch macbook:/Users/pjb/src/trustonic/tbase/users/pasbou01/dev_kinibi_wb_sdk/ /home/pjb/src/trustonic/tbase/users/pasbou01/dev_kinibi_wb_sdk-macbook'
alias to-mb='rsynch /home/pjb/src/trustonic/tbase/users/pasbou01/dev_kinibi_wb_sdk-macbook/ macbook:/Users/pjb/src/trustonic/tbase/users/pasbou01/dev_kinibi_wb_sdk'
function mvn(){
TERM=unix mvn "$@"
}
function jbrew(){
HOME=/Users/julare01 sudo -u julian brew "$@"
}
}
bashrc_trustonic_set_defaults
bashrc_trustonic_filter_environment
bashrc_trustonic_set_environment
bashrc_trustonic_define_functions
source "$HOME/src/trustonic/functions.bash"
# sudo port select --set maven maven2
# sudo port select --set maven maven31
# sudo port select --set python python27
# sudo port select --set python2 python27
# sudo bash -c 'cat /opt/local/etc/w3m/mailcap-dist>> /opt/local/etc/w3m/mailcap '
# sudo port select --set pip pip27
# if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then
# . /opt/local/etc/profile.d/bash_completion.sh
# fi
# export PATH="/opt/local/libexec/gnubin:$PATH"
#### THE END ####