summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-08-30 08:53:43 +0300
committerSam James <sam@gentoo.org>2023-08-30 07:33:18 +0100
commit5920ebad5ba36b1aee62a284ffae125f52bde6f3 (patch)
tree6f5f51226606d192f67c2a62b33afaba8142d3aa /mail-mta
parentmedia-fonts/culmus: use simpler use condition (diff)
downloadgentoo-5920ebad5ba36b1aee62a284ffae125f52bde6f3.tar.gz
gentoo-5920ebad5ba36b1aee62a284ffae125f52bde6f3.tar.bz2
gentoo-5920ebad5ba36b1aee62a284ffae125f52bde6f3.zip
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 <arthurzam@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/courier/courier-1.1.5-r3.ebuild6
-rw-r--r--mail-mta/courier/courier-1.2.3-r1.ebuild4
-rw-r--r--mail-mta/courier/courier-1.3.3.ebuild4
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}