summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-27 14:49:42 +0100
committerMichał Górny <mgorny@gentoo.org>2015-11-29 11:07:23 +0100
commite2b497dbdb03528badeaa83e6d4ec4849de49172 (patch)
treead6b556ce4fa1153604b54680359deaf4b086e87 /eclass/bash-completion-r1.eclass
parentgit-r3.eclass: Accept any ref rather than refs/heads/* only (diff)
downloadgentoo-e2b497dbdb03528badeaa83e6d4ec4849de49172.tar.gz
gentoo-e2b497dbdb03528badeaa83e6d4ec4849de49172.tar.bz2
gentoo-e2b497dbdb03528badeaa83e6d4ec4849de49172.zip
bash-completion-r1.eclass: Die on pkg-config getter failure
Diffstat (limited to 'eclass/bash-completion-r1.eclass')
-rw-r--r--eclass/bash-completion-r1.eclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 25519736122..9877baa3fd7 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -41,12 +41,13 @@ _bash-completion-r1_get_bashdir() {
debug-print-function ${FUNCNAME} "${@}"
if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
- local path="$($(tc-getPKG_CONFIG) --variable=$1 bash-completion)"
+ local path
+ path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
# we need to return unprefixed, so strip from what pkg-config returns
# to us, bug #477692
echo "${path#${EPREFIX}}"
else
- echo $2
+ echo "${2}"
fi
}