Something went wrong. Try again.
Local-first knowledge base made for Typst and the Atmosphere. typbase.at
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152#!/usr/bin/env bash
# Builds the xbps package from the generated template and signs the repository# when XBPS_REPOSITORY_SIGNING_KEY is set. Runs inside the Void Linux container.
set -euo pipefail
version=${VERSION:-}sha256=${SHA256:-}if [[ -z "$version" || -z "$sha256" ]]; then echo "Usage: VERSION=<version> SHA256=<sha256> $0" >&2 exit 1fiapp_url=${APP_URL:-https://typbase.at}
repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)void_packages=${VOID_PACKAGES:-"$HOME/void-packages"}
if [[ ! -d "$void_packages/.git" ]]; then git clone --depth=1 https://github.com/void-linux/void-packages.git "$void_packages"fi
cd "$void_packages"ln -sf / masterdirmkdir -p hostdircp -a "$HOME/.cargo" "$HOME/.rustup" hostdir/
mkdir -p srcpkgs/typbasebash "$repo_root/scripts/distro/void/generate-template.sh" \ "$version" \ "$sha256" \ "$app_url" \ > srcpkgs/typbase/template
xlint srcpkgs/typbase/template./xbps-src -I fetch typbase
cp "$repo_root/scripts/distro/void/tauri.sh" common/build-style/./xbps-src pkg typbase
if [[ -z "${XBPS_REPOSITORY_SIGNING_KEY:-}" ]]; then echo "XBPS_REPOSITORY_SIGNING_KEY is not set; skipping signing."else printf '%s\n' "$XBPS_REPOSITORY_SIGNING_KEY" > private.pem xbps-rindex --privkey private.pem --sign --signedby "void@lemueldls.dev" hostdir/binpkgs xbps-rindex --privkey private.pem --sign-pkg hostdir/binpkgs/*.xbpsfi
out=${GITHUB_WORKSPACE:-$repo_root}/void-outmkdir -p "$out"cp hostdir/binpkgs/*.xbps hostdir/binpkgs/x86_64-repodata "$out/"