#!/bin/bash set -e # Install native dependencies apt update apt install -y curl git # Install bagop curl -L -o /tmp/bagop "https://github.com/pojntfx/bagop/releases/latest/download/bagop.linux-$(uname -m)" install /tmp/bagop /usr/local/bin # Generate dependencies make depend # Build CGO_ENABLED=0 bagop -j "$(nproc)" -b stfs -x '(android/*|ios/*|aix/*|plan9/*|illumos/*|dragonfly/*|netbsd/*|openbsd/*|solaris/*|freebsd/(386|arm)|js/wasm|linux/(mips|ppc64|riscv64)|windows/arm)' -p 'make build/stfs DST=$DST' -d out exit 0