23 lines
491 B
Bash
Executable File
23 lines
491 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source /etc/portage/check-portdir.sh
|
|
source /etc/init.d/functions.sh
|
|
source /etc/portage/util-functions.sh
|
|
|
|
NEWSDIR="${PORTDIR}"/metadata/news
|
|
ebegin "Updating news items"
|
|
if [[ -e $NEWSDIR ]]; then
|
|
git -C "$NEWSDIR" pull --ff
|
|
else
|
|
git clone https://anongit.gentoo.org/git/proj/gentoo-news.git "$NEWSDIR"
|
|
fi
|
|
eend_die $?
|
|
|
|
ebegin "Cleaning news git repo"
|
|
git -C "$NEWSDIR" clean -fdxq
|
|
eend_die $?
|
|
|
|
ebegin "Copying news to base directory"
|
|
cp -a "$NEWSDIR"/*/* "$NEWSDIR"
|
|
eend $?
|