commit: b6abda9ac42b4513037cdd49e28d352e8cf1de38 parent: ca762809a9358476de169a5440134ecf888fce37 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Tue, 4 Jun 2019 02:45:31 +0200 Fix 000-sync* scripts and their locationDiffstat:
7 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/postsync.d/000-sync_gentoo_cache b/postsync.d/000-sync_gentoo_cache @@ -1,34 +0,0 @@ -#!/bin/bash - -repository_name="${1}" -repository_path="${3}" - -[[ ${repository_name} == "gentoo" ]] || exit 0 - -source /lib/gentoo/functions.sh - -# Number of jobs for egencache, default is number or processors. -parallel_jobs="$(nproc)" - -if [[ -f ${repository_path}/metadata/timestamp.x ]]; then - portage_current_timestamp=$(cut -f 1 -d " " "${repository_path}/metadata/timestamp.x" ) -else - portage_current_timestamp=0 -fi - -ebegin "Fetching metadata timestamp for ${repository_name}" -rsync -aq rsync://rsync.gentoo.org/gentoo-portage/metadata/timestamp.x "${repository_path}"/metadata/timestamp.x -eend $? -portage_new_timestamp=$(cut -f 1 -d " " "${repository_path}/metadata/timestamp.x" ) - -if [[ ${portage_current_timestamp} -lt ${portage_new_timestamp} ]]; 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 $? -else - einfo "Metadata cache for ${repository_name} already recent, no need to fetch it :-)" -fi - -ebegin "Updating metadata cache for ${repository_name}" -egencache --jobs="${parallel_jobs}" --repo="${repository_name}" --update --update-use-local-desc -eend $? diff --git a/repo.postsync.d/000-sync_gentoo_cache b/repo.postsync.d/000-sync_gentoo_cache @@ -0,0 +1,34 @@ +#!/bin/bash + +repository_name="${1}" +repository_path="${3}" + +[[ "${repository_name}" == "gentoo" ]] || exit 0 + +source /lib/gentoo/functions.sh + +# Number of jobs for egencache, default is number or processors. +parallel_jobs="$(nproc)" + +if [[ -f ${repository_path}/metadata/timestamp.x ]]; then + portage_current_timestamp=$(cut -f 1 -d " " "${repository_path}/metadata/timestamp.x" ) +else + portage_current_timestamp=0 +fi + +ebegin "Fetching metadata timestamp for ${repository_name}" +rsync -aq rsync://rsync.gentoo.org/gentoo-portage/metadata/timestamp.x "${repository_path}"/metadata/timestamp.x +eend $? +portage_new_timestamp=$(cut -f 1 -d " " "${repository_path}/metadata/timestamp.x" ) + +if [[ ${portage_current_timestamp} -lt ${portage_new_timestamp} ]]; 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 $? +else + einfo "Metadata cache for ${repository_name} already recent, no need to fetch it :-)" +fi + +ebegin "Updating metadata cache for ${repository_name}" +egencache --jobs="${parallel_jobs}" --repo="${repository_name}" --update --update-use-local-desc +eend $? diff --git a/postsync.d/000-sync_gentoo_dtd b/repo.postsync.d/000-sync_gentoo_dtd diff --git a/postsync.d/000-sync_gentoo_glsa b/repo.postsync.d/000-sync_gentoo_glsa diff --git a/postsync.d/000-sync_gentoo_news b/repo.postsync.d/000-sync_gentoo_news diff --git a/postsync.d/000-sync_gentoo_projects_xml b/repo.postsync.d/000-sync_gentoo_projects_xml diff --git a/postsync.d/000-sync_overlay_cache b/repo.postsync.d/000-sync_overlay_cache