#!/bin/bash DESTDIR=./dist VERSION=$(git describe --tag | sed 's/^v//') ITERATION=1 NAME=scw-cap DOCKER_IMAGE=registry.scw.systems/debian-build:latest rm -rf $DESTDIR install -d $DESTDIR/{usr/bin,etc/systemd/system,etc/$NAME,usr/share/$NAME} make all-debian install -m 755 munchclient $DESTDIR/usr/bin/$NAME install -m 644 munchclient.toml $DESTDIR/etc/$NAME/$NAME.toml install -m 644 munchclient.toml $DESTDIR/usr/share/$NAME/$NAME.toml # install -m 644 munchclient.service $DESTDIR/etc/systemd/system/$NAME.service # install -m 644 ca-chain.cert.pem $DESTDIR/usr/share/$NAME/ docker run -i -t --rm -v $PWD:/go/src/git.scraperwall.com/scw/munchclient -w /go/src/git.scraperwall.com/scw/munchclient registry.scw.systems/debian-build:latest \ fpm -s dir -t deb -C $DESTDIR --name $NAME \ --version $VERSION \ --iteration $ITERATION \ --deb-systemd $NAME.service \ --description "ScraperWall Packet Capture" \ --config-files /etc/$NAME/$NAME.toml \ -p ./debian rm -rf $DESTDIR