From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D1AF51581EC for ; Wed, 20 Nov 2024 15:04:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C0EDE07D4; Wed, 20 Nov 2024 15:04:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E2624E07D4 for ; Wed, 20 Nov 2024 15:04:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BEC30340C40 for ; Wed, 20 Nov 2024 15:04:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0470418C4 for ; Wed, 20 Nov 2024 15:04:55 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1732115076.e46f7f9f4ec09e4fb84653187a2846f778441581.flow@gentoo> Subject: [gentoo-commits] proj/tex:main commit in: / X-VCS-Repository: proj/tex X-VCS-Files: populate-distdir X-VCS-Directories: / X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: e46f7f9f4ec09e4fb84653187a2846f778441581 X-VCS-Branch: main Date: Wed, 20 Nov 2024 15:04:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: db149af6-eba6-4cd8-a3a3-64ef4b1d63b0 X-Archives-Hash: 455f065f80857d5251117788c595cea5 commit: e46f7f9f4ec09e4fb84653187a2846f778441581 Author: Florian Schmaus gentoo org> AuthorDate: Wed Nov 20 15:04:36 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Wed Nov 20 15:04:36 2024 +0000 URL: https://gitweb.gentoo.org/proj/tex.git/commit/?id=e46f7f9f populate-distdir: add new options Signed-off-by: Florian Schmaus gentoo.org> populate-distdir | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/populate-distdir b/populate-distdir index b63abfa..3865ef6 100755 --- a/populate-distdir +++ b/populate-distdir @@ -3,8 +3,29 @@ set -euo pipefail SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) +DISTDIR="$(portageq distdir)" +EBUILD_ACTION="fetch" + +while getopts em OPT; do + case $OPT in + e) + DISTDIR="${SCRIPT_DIR}/distdir" + ;; + m) + EBUILD_ACTION="manifest" + ;; + *) + echo "usage: ${0##*/} [-e] [-m]" + echo -e "\t-e -- extra distdir" + echo -e "\t-m -- generate manifest (instead of fetching distfiles)" + echo -e "\t will populate DISTDIR only with distfiles not yet in manifest" + exit 2 + esac +done +shift $(( OPTIND - 1 )) +OPTIND=1 + : "${TEX_OVERLAY_PATH:=$(portageq get_repo_path / tex-overlay)}" -: "${DISTDIR:="${SCRIPT_DIR}/distdir"}" if [[ ! -d "${DISTDIR}" ]]; then mkdir "${DISTDIR}" @@ -17,4 +38,4 @@ export DISTDIR export USE="doc source" find "${TEX_OVERLAY_PATH}" -type f -name '*.ebuild' -print0 |\ - xargs --null -I {} ebuild {} fetch + xargs --null -I {} ebuild {} "${EBUILD_ACTION}"