From: "Ulrich Müller" <ulm@gentoo.org>
To: <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] [PATCH] elisp.eclass: Test if the DOCS variable has a value.
Date: Fri, 21 Feb 2020 10:35:23 +0100 [thread overview]
Message-ID: <w6gimk0xoda.fsf@kph.uni-mainz.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]
The current test for the return status of declare -p will be true
if DOCS is declared but otherwise has a void value. Test for presence
of an = sign in the output instead.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/elisp.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index a411f602cf7..7876928c7fb 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,4 +1,4 @@
-# Copyright 2002-2019 Gentoo Authors
+# Copyright 2002-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: elisp.eclass
@@ -173,7 +173,7 @@ elisp_src_install() {
# install documentation only when explicitly requested
case ${EAPI} in
4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;;
- *) declare -p DOCS &>/dev/null && einstalldocs ;;
+ *) [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs ;;
esac
if declare -f readme.gentoo_create_doc >/dev/null; then
readme.gentoo_create_doc
--
2.25.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
reply other threads:[~2020-02-21 9:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=w6gimk0xoda.fsf@kph.uni-mainz.de \
--to=ulm@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox