-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetToolDAQ.sh
executable file
·167 lines (125 loc) · 2.63 KB
/
GetToolDAQ.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
#!/bin/bash
init=1
tooldaq=1
boostflag=1
zmq=1
final=1
rootflag=0
while [ ! $# -eq 0 ]
do
case "$1" in
--help | -h)
helpmenu
exit
;;
--with_root | -r)
echo "Installing ToolDAQ with root"
rootflag=1
;;
--no_boost | -b)
echo "Installing ToolDAQ without boost"
boostflag=0
;;
--no_init )
echo "Installing ToolDAQ without creating ToolDAQ Folder"
init=0;
;;
--no_zmq )
echo "Installing ToolDAQ without zmq"
zmq=0
;;
--no_tooldaq )
echo "Installing dependancies without ToolDAQ"
tooldaq=0
;;
--no_final )
echo "Installing ToolDAQ without compiling ToolAnalysis"
final=0
;;
--ToolDAQ_ZMQ )
echo "Installing ToolDAQ & ZMQ"
boostflag=0
rootflag=0
final=0
;;
--Boost )
echo "Installing Boost"
init=0
tooldaq=0
zmq=0
final=0
rootflag=0
;;
--Root )
echo "Installing Root"
init=0
tooldaq=0
boostflag=0
zmq=0
final=0
rootflag=1
;;
--Final )
echo "Compiling ToolDAQ"
init=0
tooldaq=0
boostflag=0
rootflag=0
zmq=0
;;
esac
shift
done
if [ $init -eq 1 ]
then
mkdir ToolDAQ
fi
cd ToolDAQ
if [ $tooldaq -eq 1 ]
then
git clone https://github.com/ToolDAQ/ToolDAQFramework.git
fi
if [ $zmq -eq 1 ]
then
git clone https://github.com/ToolDAQ/zeromq-4.0.7.git
cd zeromq-4.0.7
./configure --prefix=`pwd`
make -j8
make install
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
cd ../
fi
if [ $boostflag -eq 1 ]
then
git clone https://github.com/ToolDAQ/boost_1_66_0.git
#wget http://downloads.sourceforge.net/project/boost/boost/1.66.0/boost_1_66_0.tar.gz
#tar zxf boost_1_66_0.tar.gz
#rm -rf boost_1_66_0.tar.gz
cd boost_1_66_0
mkdir install
./bootstrap.sh --prefix=`pwd`/install/ > /dev/null 2>/dev/null
./b2 install iostreams
export LD_LIBRARY_PATH=`pwd`/install/lib:$LD_LIBRARY_PATH
cd ../
fi
if [ $rootflag -eq 1 ]
then
wget https://root.cern.ch/download/root_v5.34.34.source.tar.gz
tar zxvf root_v5.34.34.source.tar.gz
rm -rf root_v5.34.34.source.tar.gz
cd root
./configure --enable-rpath
make -j8
make install
source ./bin/thisroot.sh
cd ../
fi
cd ../
if [ $final -eq 1 ]
then
echo "current directory"
echo `pwd`
make clean
make
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
fi