Merge branch 'repo-postsync' of git://github.com/redneb/portage-gentoo-git-config
This commit is contained in:
commit
2a7607cdea
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source /etc/portage/util-functions.sh
|
|
||||||
|
|
||||||
if [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] ; then
|
|
||||||
die "PORTDIR empty or pointing to root!"
|
|
||||||
elif [[ ! -e ${PORTDIR} ]] ; then
|
|
||||||
die "${PORTDIR} does not exist!"
|
|
||||||
fi
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source /etc/portage/check-portdir.sh
|
|
||||||
source /etc/init.d/functions.sh
|
|
||||||
source /etc/portage/util-functions.sh
|
|
||||||
|
|
||||||
# You may change this to only update cache of specific repositories.
|
|
||||||
# Should at least include 'gentoo'. Default is all repositories.
|
|
||||||
repository_list=( $(portageq get_repos /) )
|
|
||||||
|
|
||||||
# Number of jobs for egencache, default is number or processors.
|
|
||||||
parallel_jobs="$(nproc)"
|
|
||||||
|
|
||||||
|
|
||||||
ebegin "Fetching pre-generated metadata cache for gentoo repository"
|
|
||||||
rsync -aq rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${PORTDIR}"/metadata/md5-cache/
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
einfo "Updating metadata cache for repositories:"
|
|
||||||
for repo in "${repository_list[@]}"; do
|
|
||||||
ebegin " ${repo}"
|
|
||||||
egencache --jobs="${parallel_jobs}" --repo="${repo}" --update --update-use-local-desc
|
|
||||||
eend $?
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source /etc/portage/check-portdir.sh
|
|
||||||
source /etc/init.d/functions.sh
|
|
||||||
source /etc/portage/util-functions.sh
|
|
||||||
|
|
||||||
DTDDIR="${PORTDIR}"/metadata/dtd
|
|
||||||
ebegin "Updating DTDs"
|
|
||||||
if [[ -e ${DTDDIR} ]]; then
|
|
||||||
git -C "${DTDDIR}" pull -q --ff
|
|
||||||
else
|
|
||||||
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
|
||||||
fi
|
|
||||||
eend "$?"
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source /etc/portage/check-portdir.sh
|
|
||||||
source /etc/init.d/functions.sh
|
|
||||||
source /etc/portage/util-functions.sh
|
|
||||||
|
|
||||||
GLSADIR="${PORTDIR}"/metadata/glsa
|
|
||||||
ebegin "Updating GLSAs"
|
|
||||||
if [[ -e ${GLSADIR} ]]; then
|
|
||||||
git -C "${GLSADIR}" pull -q --ff
|
|
||||||
else
|
|
||||||
git clone -q https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
|
||||||
fi
|
|
||||||
eend "$?"
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source /etc/portage/check-portdir.sh
|
|
||||||
source /etc/init.d/functions.sh
|
|
||||||
source /etc/portage/util-functions.sh
|
|
||||||
|
|
||||||
ebegin "Updating herds.xml"
|
|
||||||
wget -q -O "${PORTDIR}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
|
||||||
eend $?
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/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 -q --ff
|
|
||||||
else
|
|
||||||
git clone -q 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 $?
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/init.d/functions.sh
|
||||||
|
source /etc/portage/util-functions.sh
|
||||||
|
|
||||||
|
repository_name="${1}"
|
||||||
|
repository_path="${3}"
|
||||||
|
|
||||||
|
# Number of jobs for egencache, default is number or processors.
|
||||||
|
parallel_jobs="$(nproc)"
|
||||||
|
|
||||||
|
if [[ ${repository_name} == "gentoo" ]]; then
|
||||||
|
ebegin "Fetching pre-generated metadata cache for ${repository_name}"
|
||||||
|
rsync -aq rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${repository_path}"/metadata/md5-cache/
|
||||||
|
eend $?
|
||||||
|
|
||||||
|
ebegin "Updating metadata cache for ${repository_name}"
|
||||||
|
egencache --jobs="${parallel_jobs}" --repo="${repository_name}" --update --update-use-local-desc
|
||||||
|
eend $?
|
||||||
|
fi
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/init.d/functions.sh
|
||||||
|
source /etc/portage/util-functions.sh
|
||||||
|
|
||||||
|
repository_name="${1}"
|
||||||
|
repository_path="${3}"
|
||||||
|
|
||||||
|
if [[ ${repository_name} == "gentoo" ]]; then
|
||||||
|
DTDDIR="${repository_path}"/metadata/dtd
|
||||||
|
ebegin "Updating DTDs"
|
||||||
|
if [[ -e ${DTDDIR} ]]; then
|
||||||
|
git -C "${DTDDIR}" pull -q --ff
|
||||||
|
else
|
||||||
|
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
||||||
|
fi
|
||||||
|
eend "$?"
|
||||||
|
fi
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/init.d/functions.sh
|
||||||
|
source /etc/portage/util-functions.sh
|
||||||
|
|
||||||
|
repository_name="${1}"
|
||||||
|
repository_path="${3}"
|
||||||
|
|
||||||
|
if [[ ${repository_name} == "gentoo" ]]; then
|
||||||
|
GLSADIR="${repository_path}"/metadata/glsa
|
||||||
|
ebegin "Updating GLSAs"
|
||||||
|
if [[ -e ${GLSADIR} ]]; then
|
||||||
|
git -C "${GLSADIR}" pull -q --ff
|
||||||
|
else
|
||||||
|
git clone -q https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
||||||
|
fi
|
||||||
|
eend "$?"
|
||||||
|
fi
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/init.d/functions.sh
|
||||||
|
source /etc/portage/util-functions.sh
|
||||||
|
|
||||||
|
repository_name="${1}"
|
||||||
|
repository_path="${3}"
|
||||||
|
|
||||||
|
if [[ ${repository_name} == "gentoo" ]]; then
|
||||||
|
ebegin "Updating herds.xml"
|
||||||
|
wget -q -O "${repository_path}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
||||||
|
eend $?
|
||||||
|
fi
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/init.d/functions.sh
|
||||||
|
source /etc/portage/util-functions.sh
|
||||||
|
|
||||||
|
repository_name="${1}"
|
||||||
|
repository_path="${3}"
|
||||||
|
|
||||||
|
if [[ ${repository_name} == "gentoo" ]]; then
|
||||||
|
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/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 $?
|
||||||
|
fi
|
Loading…
Reference in New Issue