diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/reprepro_sync.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/bin/reprepro_sync.sh b/bin/reprepro_sync.sh new file mode 100755 index 0000000..04af242 --- /dev/null +++ b/bin/reprepro_sync.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +ARCHIVE="/srv/$(hostname -f)/archive" +REPOSITORY="/srv/$(hostname -f)/packages" +VENDOR="$(hostname -d | awk -F. '{ print $1 }')" + +cd "${REPOSITORY}" + +if [ ! -e conf ] +then + exit 0 +fi + +DISTRIBUTIONS="$(awk '/^Codename: / { print $2 }' conf/distributions)" + +for DISTRIBUTION in ${DISTRIBUTIONS} +do + reprepro -b "${REPOSITORY}" export ${DISTRIBUTION} + reprepro -b "${REPOSITORY}" check ${DISTRIBUTION} +done + +rm -rf project +mkdir project + +for ITEM in other/pgp other/ssh other/tls +do + if [ ! -e "${ARCHIVE}/${ITEM}" ] + then + continue + fi + + cp -aL "${ARCHIVE}/${ITEM}" project +done + +mkdir -p project/trace +echo "$(date -R)" > "project/trace/$(hostname -f)" |