000-sync_gentoo_dtd (359B)
1 #!/bin/bash 2 3 repository_name="${1}" 4 repository_path="${3}" 5 6 [[ ${repository_name} == "gentoo" ]] || exit 0 7 8 source /lib/gentoo/functions.sh 9 10 DTDDIR="${repository_path}"/metadata/dtd 11 ebegin "Updating DTDs" 12 if [[ -e ${DTDDIR} ]]; then 13 git -C "${DTDDIR}" pull -q --ff-only 14 else 15 git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}" 16 fi 17 eend "$?"