-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbpp-setup.sh
executable file
·381 lines (347 loc) · 9.49 KB
/
bpp-setup.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
#! /bin/bash
CORE_VERSION=2.1.0
SEQ_VERSION=2.1.0
PHYL_VERSION=2.1.0
POPGEN_VERSION=2.1.0
SEQOMICS_VERSION=2.1.0
PHYLOMICS_VERSION=2.1.0
RAA_VERSION=2.1.0
QT_VERSION=2.1.0
SUITE_VERSION=0.8.0
PHYVIEW_VERSION=0.3.0
PATH_GET=/usr/bin/wget
PATH_TAR=/bin/tar
PATH_CMK=/usr/bin/cmake
PATH_MAK=/usr/bin/make
PATH_INSTALL=$HOME/.local
BPP_DOWNLOAD_URL=http://biopp.univ-montp2.fr/repos/sources
clear
echo "+------------------------------------------------------------+"
echo "| Bio++ Installation script, version 2.1.0 |"
echo "| This script will download, compile and install Bio++. |"
echo "+------------------------------------------------------------+"
echo ""
#--------------------------------------------------------------------
# Checking parameters:
#wget
until [ -f $PATH_GET ] && [ -x $PATH_GET ]
do
echo "$PATH_GET does not exists or is not executable."
echo -n "Full path toward wget command:"
read PATH_GET
done
echo "wget command: $PATH_GET"
echo ""
#tar
until [ -f $PATH_TAR ] && [ -x $PATH_TAR ]
do
echo "$PATH_TAR does not exists or is not executable."
echo -n "Full path toward tar command:"
read PATH_TAR
done
echo "tar command: $PATH_TAR"
echo ""
#cmake
until [ -f $PATH_CMK ] && [ -x $PATH_CMK ]
do
echo "$PATH_CMK does not exists or is not executable."
echo -n "Full path toward cmake command:"
read PATH_CMK
done
echo "cmake command: $PATH_CMK"
echo ""
#make
until [ -f $PATH_MAK ] && [ -x $PATH_MAK ]
do
echo "$PATH_MAK does not exists or is not executable."
echo -n "Full path toward make command:"
read PATH_MAK
done
echo "make command: $PATH_MAK"
echo ""
#install dir
echo -n "Installation directory [$PATH_INSTALL]:"
read path
if [ "$path" != "" ] && [ "$path" != "y" ] && [ "$path" != "yes" ];
then
until [ -d $path ]
do
echo "Directory $path does not exist."
echo -n "Installation directory:"
read path
done
PATH_INSTALL=$path
fi
#Download all archives:
# Core:
CORE="yes"
echo -n "Do you want to download Bpp-Core [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
echo "Ok, ending here!"
exit
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-core-$CORE_VERSION.tar.gz
fi
if [ "$CORE" == "yes" ];
then
# SeqLib:
SEQ="yes"
echo -n "Do you want to download Bpp-Seq [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
SEQ="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-seq-$SEQ_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ];
then
# PhylLib:
PHYL="yes"
echo -n "Do you want to download Bpp-Phyl [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
PHYL="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-phyl-$PHYL_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ];
then
# PopGenLib:
POPGEN="yes"
echo -n "Do you want to download Bpp-PopGen [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
POPGEN="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-popgen-$POPGEN_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ];
then
# Bpp-Raa:
RAA="yes"
echo -n "Do you want to download Bpp-Raa [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
RAA="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-raa-$RAA_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ] && [ "$PHYL" == "yes" ];
then
# Bpp-Qt:
QT="yes"
echo -n "Do you want to download Bpp-Qt [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
QT="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-qt-$QT_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ];
then
# Bpp-Seq-Omics:
SEQOMICS="yes"
echo -n "Do you want to download Bpp-Seq-Omics [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
SEQOMICS="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-seq-omics-$SEQOMICS_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ] && [ "$PHYL" == "yes" ];
then
# Bpp-Phyl-Omics:
PHYLOMICS="yes"
echo -n "Do you want to download Bpp-Phyl-Omics [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
PHYLOMICS="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bpp-phyl-omics-$SEQOMICS_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ] && [ "$PHYL" == "yes" ];
then
# BppSuite:
SUITE="yes"
echo -n "Do you want to download BppSuite [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
SUITE="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bppsuite-$SUITE_VERSION.tar.gz
fi
fi
if [ "$CORE" == "yes" ] && [ "$SEQ" == "yes" ] && [ "$PHYL" == "yes" ];
then
# BppPhyView:
PHYVIEW="yes"
echo -n "Do you want to download BppPhyView [yes]/no?"
read test
if [ "$test" != "yes" ] && [ "$test" != "y" ] && [ "$test" != "" ];
then
PHYVIEW="no"
else
$PATH_GET -nc $BPP_DOWNLOAD_URL/bppphyview-$PHYVIEW_VERSION.tar.gz
fi
fi
# Now uncompress, configure, compile and install all libs
if [ "$CORE" == "yes" ];
then
clear
echo "+-----------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Core |"
echo "+-----------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-core-$CORE_VERSION.tar.gz
cd bpp-core-$CORE_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
export CPPFLAGS=-I$PATH_INSTALL/include
export LDFLAGS=-L$PATH_INSTALL/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PATH_INSTALL/lib
if [ "$SEQ" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Seq |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-seq-$SEQ_VERSION.tar.gz
cd bpp-seq-$SEQ_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$PHYL" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Phyl |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-phyl-$PHYL_VERSION.tar.gz
cd bpp-phyl-$PHYL_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$POPGEN" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-PopGen |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-popgen-$POPGEN_VERSION.tar.gz
cd bpp-popgen-$POPGEN_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$SEQOMICS" == "yes" ];
then
clear
echo "+---------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Seq-Omics |"
echo "+---------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-seq-omics-$SEQOMICS_VERSION.tar.gz
cd bpp-seq-omics-$SEQOMICS_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$PHYLOMICS" == "yes" ];
then
clear
echo "+----------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Phyl-Omics |"
echo "+----------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-phyl-omics-$PHYLOMICS_VERSION.tar.gz
cd bpp-phyl-omics-$PHYLOMICS_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$RAA" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Raa |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-raa-$RAA_VERSION.tar.gz
cd bpp-raa-$RAA_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$QT" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing Bpp-Qt |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bpp-qt-$QT_VERSION.tar.gz
cd bpp-qt-$QT_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$SUITE" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing BppSuite |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bppsuite-$SUITE_VERSION.tar.gz
cd bppsuite-$SUITE_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi
if [ "$PHYVIEW" == "yes" ];
then
clear
echo "+------------------------------------------------------------+"
echo "| Unpacking, configuring, building and installing BppPhyView |"
echo "+------------------------------------------------------------+"
echo ""
$PATH_TAR -xvzf bppphyview-$PHYVIEW_VERSION.tar.gz
cd bppphyview-$PHYVIEW_VERSION
cmake -DCMAKE_INSTALL_PREFIX=$PATH_INSTALL .
make
make install
cd ..
fi