Commit 44dcd5a0 authored by Sebastian Oeste's avatar Sebastian Oeste 🐧
Browse files

collectd-likwid-plugin: Add build.sh

parent 71fa5d42
#! /bin/bash
get_collectd_sources() {
wget -c "https://collectd.org/files/collectd-5.12.0.tar.bz2"
}
build_docker_image() {
if [[ $(docker images -q collectd-likwid-plugin-build) == "" ]]; then
docker build -t collectd-likwid-plugin-build "$(pwd)/../centos-dev-docker/"
fi
}
run_build() {
build_docker_image
docker run --rm --volume="$(pwd)":/src --workdir=/src collectd-likwid-plugin-build collectd.spec
}
check_rpm_deps() {
[[ -f collectd-5.12.0-1.el7.x86_64.rpm ]] && \
[[ -f likwid-5.1.0-1.x86_64.rpm ]] && \
[[ -f likwid-devel-5.1.0-1.x86_64.rpm ]] || echo "Error RPM dependencies not satisfied!"
}
check_rpm_deps || exit 1
if [[ ! -d collectd-5.12.0 ]]; then
get_collectd_sources
tar xjf collectd-5.12.0.tar.bz2
fi
run_build
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment