Skip to content

Commit

Permalink
elisp.eclass: Test if the DOCS variable has a value.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ulm committed Feb 22, 2020
1 parent d24d916 commit 8202b9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eclass/elisp.eclass
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8202b9e

Please sign in to comment.