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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 336E81581D3 for ; Sun, 2 Jun 2024 13:58:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC3A0E2B47; Sun, 2 Jun 2024 13:57:26 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 3AF24E2B44 for ; Sun, 2 Jun 2024 13:57:26 +0000 (UTC) From: Florian Schmaus To: gentoo-dev@lists.gentoo.org Cc: pacho@gentoo.org, Florian Schmaus Subject: [gentoo-dev] [PATCH 2/4] readme.gentoo-r1.eclass: use _GREADME_TMP_FILE in existing code Date: Sun, 2 Jun 2024 15:57:07 +0200 Message-ID: <20240602135716.66992-3-flow@gentoo.org> X-Mailer: git-send-email 2.44.1 In-Reply-To: <20240602135716.66992-1-flow@gentoo.org> References: <20240109083914.242561-1-flow@gentoo.org> <20240602135716.66992-1-flow@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: d9ef1b70-f0a6-4707-9ac0-2619ff16fee9 X-Archives-Hash: 003a23d097b44b65102cc8fc218b5c42 The previous commit introduced _GREADME_TMP_FILE. This commit changes the existing code to use this variable. Signed-off-by: Florian Schmaus --- eclass/readme.gentoo-r1.eclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass index 2a79911cafbf..078077241944 100644 --- a/eclass/readme.gentoo-r1.eclass +++ b/eclass/readme.gentoo-r1.eclass @@ -70,20 +70,20 @@ readme.gentoo_create_doc() { if [[ -n "${DOC_CONTENTS}" ]]; then if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then - echo "${DOC_CONTENTS}" > "${T}"/README.gentoo || die + echo "${DOC_CONTENTS}" > "${_GREADME_TMP_FILE}" || die else local saved_flags=$- set -f # disable filename expansion in echo arguments echo -e ${DOC_CONTENTS} | fold -s -w 70 \ - | sed 's/[[:space:]]*$//' > "${T}"/README.gentoo + | sed 's/[[:space:]]*$//' > "${_GREADME_TMP_FILE}" assert set +f -${saved_flags} fi elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then - cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die + cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${_GREADME_TMP_FILE}" || die elif [[ -f "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" ]]; then - cp "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" "${T}"/README.gentoo || die - else + cp "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" "${_GREADME_TMP_FILE}" || die + elif [[ ! -f "${_GREADME_TMP_FILE}" ]]; then die "You are not specifying README.gentoo contents!" fi -- 2.44.1