summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-02-21 10:35:23 +0100
committerUlrich Müller <ulm@gentoo.org>2020-02-22 11:34:02 +0100
commit8202b9e60d84e77c03d4bc20b18d2d5ace0a713d (patch)
tree5c420169186dbfe79a332fabfe34a53ae76bdd9b /eclass/elisp.eclass
parentsavedconfig.eclass: Remove @ROFF from eclass documentation. (diff)
downloadgentoo-8202b9e60d84e77c03d4bc20b18d2d5ace0a713d.tar.gz
gentoo-8202b9e60d84e77c03d4bc20b18d2d5ace0a713d.tar.bz2
gentoo-8202b9e60d84e77c03d4bc20b18d2d5ace0a713d.zip
elisp.eclass: Test if the DOCS variable has a value.
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>
Diffstat (limited to 'eclass/elisp.eclass')
-rw-r--r--eclass/elisp.eclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index a411f602cf7c..7876928c7fb2 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