fdroid-repo/sync.sh
randogoth 81319cee4f Scaffold self-hosted F-Droid repo tooling
Nix flake dev shell (fdroidserver + jdk + rsync), a NixOS module for
serving the repo via nginx/ACME, and a sync script for publishing updates.
2026-10-12 17:58:09 +03:00

16 lines
314 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Usage: ./sync.sh user@host:/var/lib/fdroid-repo
# Regenerates the index, then rsyncs repo/ to the serving host.
cd "$(dirname "$0")"
fdroid update -c
if [ $# -lt 1 ]; then
echo "Usage: $0 user@host:/var/lib/fdroid-repo" >&2
exit 1
fi
rsync -av --delete repo/ "$1/"