#!/bin/bash set -e cd $1 || exit cd tfcli || exit echo "Building for release, v$2_$3 (+static) (--target x86_64-unknown-gnu)" cargo build --release cd ../packages/void_amd64_tfcli || exit echo "Creating workdir" rm -rf work mkdir work mkdir -p work/usr/bin mkdir -p work/etc/sv echo "Copying tfcli binary" cp ../../target/release/tfcli work/usr/bin/tfcli chmod 755 work/usr/bin/tfcli echo "Building XBPS package" xbps-create -A x86_64 -B trifid-build -H https://hub.e3t.cc/~core/trifid -l GPL-3.0-or-later -m "c0repwn3r " -n "tfcli-$2_$3" -s "A command-line client for managing trifid-api servers" work