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

18 lines
359 B
Plaintext
Raw Permalink Normal View History

2015-08-14 20:16:49 +00:00
#!/bin/bash
repository_name="${1}"
repository_path="${3}"
[[ ${repository_name} == "gentoo" ]] || exit 0
source /lib/gentoo/functions.sh
2015-08-14 20:16:49 +00:00
DTDDIR="${repository_path}"/metadata/dtd
ebegin "Updating DTDs"
if [[ -e ${DTDDIR} ]]; then
2015-11-10 13:30:31 +00:00
git -C "${DTDDIR}" pull -q --ff-only
else
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
2015-08-14 20:16:49 +00:00
fi
eend "$?"