-
Notifications
You must be signed in to change notification settings - Fork 2
/
bashrc_lepp.sh
216 lines (162 loc) · 5.02 KB
/
bashrc_lepp.sh
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#!/bin/sh
#--------------------------------------------------
# General Aliases
#--------------------------------------------------
alias ls="ls -h --color"
alias lsd="ls -d */"
alias l="ls"
alias ll="ls -lh"
alias en="emacs -nw"
alias ec="emacsclient"
alias rm~="rm *~"
alias qs="qstat -u $USER"
alias qsr="qstat -u $USER | grep ' r ' | wc"
alias qsw="qstat -u $USER | grep qw | wc"
alias k1="kill %1"
alias prt="lpr -P n223_brn_5370 -o InputSlot=AutoSelect -o PageSize=Letter -o Duplex=DuplexNoTumble"
alias evo='/usr/java/default/bin/javaws ~/local/lib/koala.jnlp'
alias jgnash='java -jar ~/local/share/jGnash/jgnash2.jar'
#--------------------------------------------------
# General ENV
#--------------------------------------------------
export TEXMFCNF=$HOME/local/share/texmf/web2c
export PATH=$HOME/local/bin:$HOME/local/sbin:$PATH
export CVSROOT=$HOME/bak/cvsroot
export CVSEDITOR=vim
export PRINTER=N223_BRN_5370
export KRB5CCNAME_LEPP=~/local/.private/krb5_lepp
export KRB5CCNAME_FNAL=~/local/.private/krb5_fnal
export KRB5CCNAME_CERN=~/local/.private/krb5_cern
#--------------------------------------------------
# Functions
#--------------------------------------------------
ki() {
if [ -z "$1" ]; then
echo "lepp (l) , fnal (f), cern (c) ?"
fi;
if [ "$1" = "l" ]; then
kinit -A -f -c $KRB5CCNAME_LEPP [email protected]
KRB5CCNAME=$KRB5CCNAME_LEPP
fi;
if [ "$1" = "f" ]; then
kinit -A -f -c $KRB5CCNAME_FNAL [email protected]
KRB5CCNAME=$KRB5CCNAME_FNAL
fi;
if [ "$1" = "c" ]; then
kinit -A -f -c $KRB5CCNAME_CERN [email protected]
KRB5CCNAME=$KRB5CCNAME_CERN
fi;
}
sl() {
if [ -z "$1" ]; then
echo "lepp (l[c,1]), fnal (f), cern (c[5])?"
elif [ "$1" = "l" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_LEPP
ssh -X [email protected]
elif [ "$1" = "l5" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_LEPP
ssh -X [email protected]
elif [ "$1" = "lc" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_LEPP
ssh -X [email protected]
elif [ "$1" = "l1" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_LEPP
ssh -X [email protected]
elif [ "$1" = "l5" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_LEPP
ssh -X [email protected]
elif [ "$1" = "f" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_FNAL
ssh -X [email protected]
elif [ "$1" = "c" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_CERN
ssh -X [email protected]
elif [ "$1" = "c5" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_CERN
ssh -X [email protected]
fi;
}
ks() {
if [ -z "$1" ]; then
echo "lepp (l) , fnal (f)?"
fi;
if [ "$1" = "l" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_LEPP
fi;
if [ "$1" = "f" ]; then
export KRB5CCNAME=FILE:$KRB5CCNAME_FNAL
fi;
}
setdhad() {
if [ -z "$1" ]; then
rel=11.4
else
rel="$1"
fi;
echo "Setting dhad-$rel ..."
directory="$HOME/work/CLEO/analysis/DHad/src/$rel"
if [ ! -d $directory ]; then
echo "Checking out code ..."
cvs co -d $HOME/work/CLEO/analysis/DHad/src/$rel dhad/src
fi
. ~/work/CLEO/analysis/DHad/src/$rel/bash/setup.sh;
export rdhad=$dhad
}
setcms() {
. /nfs/cms/sw/install/cmsset_default.sh
if [ -z "$1" ]; then
rel=2.0
else
rel="$1"
fi;
. ~/work/cms/src/$rel/setup;
if [ -z "$2" ]; then
cmsswf=$CMSSW
else
cmsswf="$2"
fi;
export [email protected]
export cmsf=$fnal:/uscms/home/xshi/work/cms
export cmssrcf=$cmsf/src/$cmsswf/src
export susyf=$cmssrcf/SusyAnalysis
export susytestf=$susyf/SusyAnalyzer/test
}
setpyroot() {
if [ -z "$1" ]; then
echo "cleo (c), hacked (h), local(l) ?"
elif [ "$1" = "c" ]; then
export C3PYTHONPATH=$C3_OTHER/python
export PATH=$C3PYTHONPATH/bin:$ROOTSYS/bin:$PATH
export PYTHONPATH=$C3PYTHONPATH:$ROOTSYS/lib:$dhad/lib/python:$dhad/src/$rel/python
export LD_LIBRARY_PATH=$C3PYTHONPATH/lib:$ROOTSYS/lib
echo "Python 2.4 ROOT 4.03"
elif [ "$1" = "h" ]; then
#export ROOTSYS=/nfs/cor/user/ponyisi/root5/
#export ROOTSYS=/nfs/cor/user/ponyisi/root5-old/
export ROOTSYS=$HOME/local/share/root/5.10
export C3PYTHONPATH=$C3_OTHER/python
export PATH=$C3PYTHONPATH/bin:$ROOTSYS/bin:$PATH
export PYTHONPATH=$C3PYTHONPATH:$ROOTSYS/lib:$dhad/lib/python:$dhad/src/$rel/python
export LD_LIBRARY_PATH=$C3PYTHONPATH/lib:$ROOTSYS/lib
echo "Python 2.4 ROOT 5.10 (hacked)"
elif [ "$1" = "l" ]; then
export ROOTSYS=$HOME/local/share/root/5.28
export PATH=$HOME/local/bin:$ROOTSYS/bin:$PATH
export PYTHONPATH=$HOME/local/lib/python2.7:$ROOTSYS/lib:$dhad/lib/python:$dhad/src/$rel/python
export LD_LIBRARY_PATH=$HOME/local/lib:$ROOTSYS/lib
echo "Python 2.7.1 ROOT 5.28"
fi;
}
pl() {
if [ -z "$1" ]; then
echo "french info(i), culture(c), inter (t) ?"
elif [ "$1" = "i" ]; then
xmms ~/.pri/france_info_64.m3u
elif [ "$1" = "c" ]; then
xmms ~/file/audio/french/france-culture-radio.m3u
elif [ "$1" = "t" ]; then
xmms ~/file/audio/french/france_inter_mp3-128k.m3u
else
echo "Unknown arg: " $1
fi;
}