gentoo-server-config/hooks/sync_post/05-sync_gentoo_news.bash
2015-10-13 01:20:04 +02:00

16 lines
420 B
Bash

#!/bin/bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "/etc/paludis/hooks/set_portdir.bash"
if [[ ${TARGET} == gentoo ]] ; then
NEWSDIR="${PORTDIR}"/metadata/news
ebegin "Updating news items"
if [[ -e ${NEWSDIR} ]]; then
git -C "${NEWSDIR}" pull -q --ff
else
git clone -q https://anongit.gentoo.org/git/data/gentoo-news.git "${NEWSDIR}"
fi
eend $? "Try to remove ${PORTDIR}/metadata/news"
fi