17 lines
314 B
Bash
17 lines
314 B
Bash
|
|
#!/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/"
|