1 |
The current test for the return status of declare -p will be true |
2 |
if DOCS is declared but otherwise has a void value. Test for presence |
3 |
of an = sign in the output instead. |
4 |
|
5 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
6 |
--- |
7 |
eclass/elisp.eclass | 4 ++-- |
8 |
1 file changed, 2 insertions(+), 2 deletions(-) |
9 |
|
10 |
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass |
11 |
index a411f602cf7..7876928c7fb 100644 |
12 |
--- a/eclass/elisp.eclass |
13 |
+++ b/eclass/elisp.eclass |
14 |
@@ -1,4 +1,4 @@ |
15 |
-# Copyright 2002-2019 Gentoo Authors |
16 |
+# Copyright 2002-2020 Gentoo Authors |
17 |
# Distributed under the terms of the GNU General Public License v2 |
18 |
|
19 |
# @ECLASS: elisp.eclass |
20 |
@@ -173,7 +173,7 @@ elisp_src_install() { |
21 |
# install documentation only when explicitly requested |
22 |
case ${EAPI} in |
23 |
4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;; |
24 |
- *) declare -p DOCS &>/dev/null && einstalldocs ;; |
25 |
+ *) [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs ;; |
26 |
esac |
27 |
if declare -f readme.gentoo_create_doc >/dev/null; then |
28 |
readme.gentoo_create_doc |
29 |
-- |
30 |
2.25.1 |