2015-08-14 20:16:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-09-05 14:22:14 +00:00
|
|
|
repository_name="${1}"
|
|
|
|
repository_path="${3}"
|
|
|
|
|
2015-08-25 13:57:56 +00:00
|
|
|
[[ ${repository_name} == "gentoo" ]] || exit 0
|
|
|
|
|
2015-08-22 18:36:19 +00:00
|
|
|
source /lib/gentoo/functions.sh
|
2015-08-14 20:16:49 +00:00
|
|
|
|
2015-08-25 13:57:56 +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}"
|
2015-08-20 23:59:04 +00:00
|
|
|
fi
|
2015-08-25 13:57:56 +00:00
|
|
|
eend $? "Try to remove ${NEWSDIR}"
|