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

18 lines
398 B
Plaintext
Raw 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
NEWSDIR="${repository_path}"/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 ${NEWSDIR}"