From 50d8ab36864f2a76e1ee210de7670b81219e1b2d Mon Sep 17 00:00:00 2001 From: "Andreas K. Huettel (dilfridge)" Date: Sat, 5 Sep 2015 16:22:14 +0200 Subject: [PATCH] First set repository_name, then check if it's gentoo --- etc/portage/repo.postsync.d/sync_gentoo_cache | 6 +++--- etc/portage/repo.postsync.d/sync_gentoo_dtd | 6 +++--- etc/portage/repo.postsync.d/sync_gentoo_glsa | 6 +++--- etc/portage/repo.postsync.d/sync_gentoo_herds_xml | 6 +++--- etc/portage/repo.postsync.d/sync_gentoo_news | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/etc/portage/repo.postsync.d/sync_gentoo_cache b/etc/portage/repo.postsync.d/sync_gentoo_cache index f7b1fe6..95863bf 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_cache +++ b/etc/portage/repo.postsync.d/sync_gentoo_cache @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - # Number of jobs for egencache, default is number or processors. parallel_jobs="$(nproc)" diff --git a/etc/portage/repo.postsync.d/sync_gentoo_dtd b/etc/portage/repo.postsync.d/sync_gentoo_dtd index d523356..56ad70d 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_dtd +++ b/etc/portage/repo.postsync.d/sync_gentoo_dtd @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - DTDDIR="${repository_path}"/metadata/dtd ebegin "Updating DTDs" if [[ -e ${DTDDIR} ]]; then diff --git a/etc/portage/repo.postsync.d/sync_gentoo_glsa b/etc/portage/repo.postsync.d/sync_gentoo_glsa index 6ce3e11..775ca90 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_glsa +++ b/etc/portage/repo.postsync.d/sync_gentoo_glsa @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - GLSADIR="${repository_path}"/metadata/glsa ebegin "Updating GLSAs" if [[ -e ${GLSADIR} ]]; then diff --git a/etc/portage/repo.postsync.d/sync_gentoo_herds_xml b/etc/portage/repo.postsync.d/sync_gentoo_herds_xml index 2075c35..277ee9f 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_herds_xml +++ b/etc/portage/repo.postsync.d/sync_gentoo_herds_xml @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - ebegin "Updating herds.xml" wget -q -O "${repository_path}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml eend $? diff --git a/etc/portage/repo.postsync.d/sync_gentoo_news b/etc/portage/repo.postsync.d/sync_gentoo_news index 78f9c41..bf24750 100755 --- a/etc/portage/repo.postsync.d/sync_gentoo_news +++ b/etc/portage/repo.postsync.d/sync_gentoo_news @@ -1,12 +1,12 @@ #!/bin/bash +repository_name="${1}" +repository_path="${3}" + [[ ${repository_name} == "gentoo" ]] || exit 0 source /lib/gentoo/functions.sh -repository_name="${1}" -repository_path="${3}" - NEWSDIR="${repository_path}"/metadata/news ebegin "Updating news items" if [[ -e ${NEWSDIR} ]]; then