summaryrefslogtreecommitdiffstats
path: root/addons/ot/test/get-opentracing-plugins.sh
blob: f2fe2d6b727c01c596fb48c6f03b86a943f032b6 (plain)
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
#!/bin/sh
#
_ARG_DIR="${1:-.}"


get ()
{
	local _arg_tracer="${1}"
	local _arg_version="${2}"
	local _arg_url="${3}"
	local _arg_file="${4}"
	local _var_tmpfile="_tmpfile_"
	local _var_plugin="lib${_arg_tracer}_opentracing_plugin-${_arg_version}.so"

	test -e "${_var_plugin}" && return 0

	wget "https://github.com/${_arg_url}/releases/download/v${_arg_version}/${_arg_file}" -O "${_var_tmpfile}" || {
		rm "${_var_tmpfile}"
		return 1
	}

	case "$(file ${_var_tmpfile})" in
	  *shared\ object*)
		mv "${_var_tmpfile}" "${_var_plugin}" ;;

	  *gzip\ compressed\ data*)
		gzip -cd "${_var_tmpfile}" > "${_var_plugin}"
		rm "${_var_tmpfile}" ;;
	esac
}


mkdir -p "${_ARG_DIR}" && cd "${_ARG_DIR}" || exit 1

get dd 1.1.2 DataDog/dd-opentracing-cpp linux-amd64-libdd_opentracing_plugin.so.gz
get dd 1.2.0 DataDog/dd-opentracing-cpp linux-amd64-libdd_opentracing_plugin.so.gz

get jaeger 0.4.2 jaegertracing/jaeger-client-cpp libjaegertracing_plugin.linux_amd64.so
#et jaeger 0.5.0 jaegertracing/jaeger-client-cpp libjaegertracing_plugin.linux_amd64.so
#et jaeger 0.6.0 jaegertracing/jaeger-client-cpp libjaegertracing_plugin.linux_amd64.so

get lightstep 0.12.0 lightstep/lightstep-tracer-cpp linux-amd64-liblightstep_tracer_plugin.so.gz
get lightstep 0.13.0 lightstep/lightstep-tracer-cpp linux-amd64-liblightstep_tracer_plugin.so.gz

get zipkin 0.5.2 rnburn/zipkin-cpp-opentracing linux-amd64-libzipkin_opentracing_plugin.so.gz