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 9C7D715800A for ; Wed, 30 Aug 2023 06:33:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF5B82BC01C; Wed, 30 Aug 2023 06:33:44 +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 A2B472BC01C for ; Wed, 30 Aug 2023 06:33:44 +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 A3620340B9B for ; Wed, 30 Aug 2023 06:33:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1058E10E6 for ; Wed, 30 Aug 2023 06:33:42 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1693377198.5920ebad5ba36b1aee62a284ffae125f52bde6f3.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/courier/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-mta/courier/courier-1.1.5-r3.ebuild mail-mta/courier/courier-1.2.3-r1.ebuild mail-mta/courier/courier-1.3.3.ebuild X-VCS-Directories: mail-mta/courier/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 5920ebad5ba36b1aee62a284ffae125f52bde6f3 X-VCS-Branch: master Date: Wed, 30 Aug 2023 06:33:42 +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: 41df7d3c-bfe1-46b3-a79d-977240784d36 X-Archives-Hash: a0442db2a987a6f6f6bb8fc35bbd97f3 commit: 5920ebad5ba36b1aee62a284ffae125f52bde6f3 Author: Arthur Zamarin gentoo org> AuthorDate: Wed Aug 30 05:53:43 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Aug 30 06:33:18 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5920ebad mail-mta/courier: use simpler bash expression The previous version was very difficult for bash parsers (like tree-sitter) to parse correctly. Signed-off-by: Arthur Zamarin gentoo.org> Signed-off-by: Sam James gentoo.org> mail-mta/courier/courier-1.1.5-r3.ebuild | 6 +++--- mail-mta/courier/courier-1.2.3-r1.ebuild | 4 ++-- mail-mta/courier/courier-1.3.3.ebuild | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mail-mta/courier/courier-1.1.5-r3.ebuild b/mail-mta/courier/courier-1.1.5-r3.ebuild index 6011e0efbe2e..af01a20fa907 100644 --- a/mail-mta/courier/courier-1.1.5-r3.ebuild +++ b/mail-mta/courier/courier-1.1.5-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -112,7 +112,7 @@ src_compile() { etc_courier() { # Import existing /etc/courier/file if it exists. # Add option only if it was not already set or even commented out - file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`" + local file="${1}" word=$(echo "${2}" | sed -e "s|=.*$||" -e "s|^.*opt ||") [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \ cp "/etc/courier/${file}" "${D}/etc/courier/${file}" grep -q "${word}" "${D}/etc/courier/${file}" || \ @@ -120,7 +120,7 @@ etc_courier() { } etc_courier_chg() { - file="${1}" ; key="${2}" ; value="${3}" ; section="${4}" + local file="${1}" key="${2}" value="${3}" section="${4}" [ -z "${section}" ] && section="${2}" grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}" sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file} diff --git a/mail-mta/courier/courier-1.2.3-r1.ebuild b/mail-mta/courier/courier-1.2.3-r1.ebuild index dad8839d8033..defc3e837d62 100644 --- a/mail-mta/courier/courier-1.2.3-r1.ebuild +++ b/mail-mta/courier/courier-1.2.3-r1.ebuild @@ -107,7 +107,7 @@ src_compile() { etc_courier() { # Import existing /etc/courier/file if it exists. # Add option only if it was not already set or even commented out - file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`" + local file="${1}" word=$(echo "${2}" | sed -e "s|=.*$||" -e "s|^.*opt ||") [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \ cp "/etc/courier/${file}" "${D}/etc/courier/${file}" grep -q "${word}" "${D}/etc/courier/${file}" || \ @@ -115,7 +115,7 @@ etc_courier() { } etc_courier_chg() { - file="${1}" ; key="${2}" ; value="${3}" ; section="${4}" + local file="${1}" key="${2}" value="${3}" section="${4}" [ -z "${section}" ] && section="${2}" grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}" sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file} diff --git a/mail-mta/courier/courier-1.3.3.ebuild b/mail-mta/courier/courier-1.3.3.ebuild index 5a2068123d54..12c086e15dc5 100644 --- a/mail-mta/courier/courier-1.3.3.ebuild +++ b/mail-mta/courier/courier-1.3.3.ebuild @@ -107,7 +107,7 @@ src_compile() { etc_courier() { # Import existing /etc/courier/file if it exists. # Add option only if it was not already set or even commented out - file="${1}" ; word="`echo \"${2}\" | sed -e\"s|=.*$||\" -e\"s|^.*opt ||\"`" + local file="${1}" word=$(echo "${2}" | sed -e "s|=.*$||" -e "s|^.*opt ||") [ ! -e "${D}/etc/courier/${file}" ] && [ -e "/etc/courier/${file}" ] && \ cp "/etc/courier/${file}" "${D}/etc/courier/${file}" grep -q "${word}" "${D}/etc/courier/${file}" || \ @@ -115,7 +115,7 @@ etc_courier() { } etc_courier_chg() { - file="${1}" ; key="${2}" ; value="${3}" ; section="${4}" + local file="${1}" key="${2}" value="${3}" section="${4}" [ -z "${section}" ] && section="${2}" grep -q "${key}" "${file}" && elog "Changing ${file}: ${key} to ${value}" sed -i -e"/\#\#NAME: ${section}/,+30 s|${key}=.*|${key}=\"${value}\"|g" ${file}