-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL
executable file
·123 lines (101 loc) · 2.92 KB
/
INSTALL
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
#!/bin/bash
#Last modified: Jul 23, 6 AM
set -e
failureMessage(){
if [ $? -eq 0 ]
then
#echo "----------------------------"
echo "$1 completed successfully."
#echo "----------------------------"
else
#echo "----------------------------"
echo "$1 FAILED."
#echo "----------------------------"
exit
fi
}
function abspath {
if [[ -d "$1" ]]
then
pushd "$1" >/dev/null
pwd
popd >/dev/null
elif [[ -e "$1" ]]
then
pushd "$(dirname "$1")" >/dev/null
echo "$(pwd)/$(basename "$1")"
popd >/dev/null
else
echo "$1" does not exist! >&2
return 127
fi
}
PPATH=$(abspath $(dirname $0))
cd $PPATH/
rm -rf $PPATH/dependencies/bcalm
rm -rf $PPATH/dependencies/kff-tools
rm -rf $PPATH/dependencies/dsk
rm -rf $PPATH/bin/essAuxKffTools
rm -rf $PPATH/bin/essAuxBlight
rm -rf $PPATH/bin/essAuxCompress
rm -rf $PPATH/bin/essAuxDecompress
rm -rf $PPATH/bin/essAuxDsk
rm -rf $PPATH/bin/essAuxDsk2ascii
rm -rf $PPATH/bin/essAuxBcalm
rm -rf $PPATH/bin/essAuxMFCompressC
rm -rf $PPATH/bin/essAuxMFCompressD
make -f $PPATH/dependencies/mfc1.01/Makefile.linux clean
cd src/ ; make ; cd ../
failureMessage "ESS-Compress core program installation"
#echo "Now installing third party softwares (note that: you can skip the rest of the steps and still try out our tool!)"
#CMake 3.1+; see http://www.cmake.org/cmake/resources/software.html
#C++/11 capable compiler (e.g. gcc 4.7+, clang 3.5+, Apple/clang 6.0+).
mkdir -p dependencies
cd dependencies
echo "Now installing Blight........"
cd blight
make clean
make -j 8
cp blight-ess ../../bin/essAuxBlight
make clean
cd ../
echo "Now installing kff-tools........"
git clone --recursive https://github.com/Kmer-File-Format/kff-tools
cd kff-tools
mkdir build && cd build && cmake .. && make -j 8
cd ../../
cp kff-tools/bin/kff-tools ../bin/essAuxKffTools
rm -rf kff-tools
echo "Now installing DSK........"
# get a local copy of source code of DSK
git clone --recursive https://github.com/GATB/dsk.git
# compile the code an run a simple test on your computer
cd dsk
sh INSTALL
failureMessage "DSK installation"
echo $PWD
mv build/bin/dsk ../../bin/essAuxDsk
mv build/bin/dsk2ascii ../../bin/essAuxDsk2ascii
echo "Now installing BCALM........"
cd ../../
cd dependencies
git clone --recursive https://github.com/GATB/bcalm
cd bcalm
mkdir build; cd build; cmake ..;
failureMessage cmake
make -j 8 #after this we are inside build
failureMessage "BCALM installation"
mv bcalm ../../../bin/essAuxBcalm
#echo "Now installing MFCompress........"
#cd ../../../
#cd dependencies/mfc1.01/
#make -f Makefile.linux
#failureMessage "MFC installation"
#mv MFCompressC ../../bin/essAuxMFCompressC
#mv MFCompressD ../../bin/essAuxMFCompressD
#make -f Makefile.linux clean
cd ../../
rm -rf dependencies/dsk
rm -rf dependencies/bcalm
#export PATH="$PWD/bin:$PATH"
echo "ESS-Compress installation (from source) was successful!!"