Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | _ARG_DIR="${1:-.}" |
| 4 | |
| 5 | |
| 6 | get () |
| 7 | { |
| 8 | local _arg_tracer="${1}" |
| 9 | local _arg_version="${2}" |
| 10 | local _arg_url="${3}" |
| 11 | local _arg_file="${4}" |
| 12 | local _var_tmpfile="_tmpfile_" |
| 13 | local _var_plugin="lib${_arg_tracer}_opentracing_plugin-${_arg_version}.so" |
| 14 | |
| 15 | test -e "${_var_plugin}" && return 0 |
| 16 | |
| 17 | wget "https://github.com/${_arg_url}/releases/download/v${_arg_version}/${_arg_file}" -O "${_var_tmpfile}" || { |
| 18 | rm "${_var_tmpfile}" |
| 19 | return 1 |
| 20 | } |
| 21 | |
| 22 | case "$(file ${_var_tmpfile})" in |
| 23 | *shared\ object*) |
| 24 | mv "${_var_tmpfile}" "${_var_plugin}" ;; |
| 25 | |
| 26 | *gzip\ compressed\ data*) |
| 27 | gzip -cd "${_var_tmpfile}" > "${_var_plugin}" |
| 28 | rm "${_var_tmpfile}" ;; |
| 29 | esac |
| 30 | } |
| 31 | |
| 32 | |
| 33 | mkdir -p "${_ARG_DIR}" && cd "${_ARG_DIR}" || exit 1 |
| 34 | |
| 35 | get dd 1.1.2 DataDog/dd-opentracing-cpp linux-amd64-libdd_opentracing_plugin.so.gz |
| 36 | get dd 1.2.0 DataDog/dd-opentracing-cpp linux-amd64-libdd_opentracing_plugin.so.gz |
| 37 | |
| 38 | get jaeger 0.4.2 jaegertracing/jaeger-client-cpp libjaegertracing_plugin.linux_amd64.so |
| 39 | #et jaeger 0.5.0 jaegertracing/jaeger-client-cpp libjaegertracing_plugin.linux_amd64.so |
| 40 | #et jaeger 0.6.0 jaegertracing/jaeger-client-cpp libjaegertracing_plugin.linux_amd64.so |
| 41 | |
| 42 | get lightstep 0.12.0 lightstep/lightstep-tracer-cpp linux-amd64-liblightstep_tracer_plugin.so.gz |
| 43 | get lightstep 0.13.0 lightstep/lightstep-tracer-cpp linux-amd64-liblightstep_tracer_plugin.so.gz |
| 44 | |
| 45 | get zipkin 0.5.2 rnburn/zipkin-cpp-opentracing linux-amd64-libzipkin_opentracing_plugin.so.gz |