2015-08-14 13:17:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
2015-08-14 14:27:57 +00:00
|
|
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
2015-08-14 15:25:37 +00:00
|
|
|
source "/etc/paludis/hooks/set_portdir.bash"
|
2015-08-17 16:08:31 +00:00
|
|
|
source "/etc/paludis/hooks/util_functions.bash"
|
2015-08-14 13:17:07 +00:00
|
|
|
|
2015-08-17 16:08:31 +00:00
|
|
|
NEWSDIR="${PORTDIR}"/metadata/news
|
|
|
|
ebegin "Updating news items"
|
|
|
|
if [[ -e ${NEWSDIR} ]]; then
|
|
|
|
git -C "${NEWSDIR}" pull --ff
|
2015-08-14 13:17:07 +00:00
|
|
|
else
|
2015-08-17 16:08:31 +00:00
|
|
|
git clone https://anongit.gentoo.org/git/proj/gentoo-news.git "${NEWSDIR}"
|
2015-08-14 13:17:07 +00:00
|
|
|
fi
|
2015-08-17 16:08:31 +00:00
|
|
|
eend_die $?
|
2015-08-14 13:17:07 +00:00
|
|
|
|
2015-08-17 16:08:31 +00:00
|
|
|
ebegin "Cleaning news git repo"
|
|
|
|
git -C "${NEWSDIR}" clean -fdxq
|
|
|
|
eend_die $?
|
|
|
|
|
|
|
|
ebegin "Copying news to base directory"
|
|
|
|
cp -a "${NEWSDIR}"/*/* "${NEWSDIR}"
|
|
|
|
eend $?
|
2015-08-14 15:37:19 +00:00
|
|
|
|