blob: 59d6af587a202430a56136ab75122f7a3ee5cc60 [file] [log] [blame]
Ilya Shipitsin73c3ed92021-05-18 09:46:43 +00001#!/bin/bash
2
3#
4# OT helper. script built from documentation: https://github.com/haproxytech/opentracing-c-wrapper
5#
6
7set -e
8
9export OT_CPP_VERSION=1.5.0
10
11if [ ! -f "download-cache/v${OT_CPP_VERSION}.tar.gz" ]; then
12 wget -P download-cache/ \
13 "https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz"
14fi
15
16if [ "$(cat ${HOME}/opt/.ot-cpp-version)" != "${OT_CPP_VERSION}" ]; then
17 tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
18 cd opentracing-cpp-${OT_CPP_VERSION}
19 mkdir build
20 cd build
21 cmake -DCMAKE_INSTALL_PREFIX=${HOME}/opt -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
22 make
23 make install
24 echo "${OT_CPP_VERSION}" > "${HOME}/opt/.ot-cpp-version"
25fi
26
27git clone https://github.com/haproxytech/opentracing-c-wrapper.git
28cd opentracing-c-wrapper
29 ./scripts/bootstrap
30 ./configure --prefix=${HOME}/opt --with-opentracing=${HOME}/opt
31 make
32 make install
33
34