portage-gentoo-git-config/etc/portage/repo.postsync.d/sync_gentoo_dtd

18 lines
363 B
Bash
Executable File

#!/bin/bash
source /lib/gentoo/functions.sh
repository_name="${1}"
repository_path="${3}"
if [[ ${repository_name} == "gentoo" ]]; then
DTDDIR="${repository_path}"/metadata/dtd
ebegin "Updating DTDs"
if [[ -e ${DTDDIR} ]]; then
git -C "${DTDDIR}" pull -q --ff
else
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
fi
eend "$?"
fi