fdroid-repo/sync.sh

17 lines
314 B
Bash
Raw Normal View History

#!/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/"