1#!/bin/sh
2set -e
3
4banner() {
5 printf "\n##\n# %s\n##\n\n" "${1}"
6}
7
8RDEST="${RDEST:-magnesium:/var/www/htdocs/files.8pit.net/alpine/edge/8pit}"
9TDEST="pkg/8pit"
10
11mkdir -p "${TDEST}"
12
13banner "Retrieving packages from remote repository."
14rsync -av --delete-excluded "${RDEST}/" "${TDEST}/"
15
16banner "Invoking buildrepo."
17buildrepo -a "$(pwd)" -d "$(pwd)/${TDEST%/*}" -R -p 8pit
18
19banner "Pushing packages to remote repository."
20rsync -av --delete-excluded "${TDEST}/" "${RDEST}/"