#!/bin/bash set -o errexit set -o pipefail set -o nounset rm -rf /build/debpkg mkdir -p /build/debpkg/usr/bin /build/debpkg/DEBIAN /build/debpkg/etc/systemd/system /build/debpkg/etc/sys-exporter install -m 755 -o root -g root /build/server /build/debpkg/usr/bin/ install -m 644 -o root -g root /debian/sys-exporter/etc/systemd/system/sys-exporter.service /build/debpkg/etc/systemd/system/ install -m 644 -o root -g root /debian/sys-exporter/etc/sys-exporter/config.yml /build/debpkg/etc/sys-exporter/ install -m 644 -o root -g root /debian/sys-exporter/control /build/debpkg/DEBIAN/control install -m 755 -o root -g root /debian/sys-exporter/postinst /build/debpkg/DEBIAN/postinst envsubst < /debian/sys-exporter/control > /build/debpkg/DEBIAN/control dpkg-deb --build /build/debpkg/ /build/sys-exporter.deb