aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2009-02-12 06:16:08 +0100
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2009-02-12 06:20:36 +0100
commitf6980972b8f3110e9764df4281a683eae0c09d4c (patch)
tree16eb3209b7958a4048cb475be7e5de4de7565162 /paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
parente1989b5c456c71d64a7b1b886fb18be833e9ae8b (diff)
downloadpaludis-f6980972b8f3110e9764df4281a683eae0c09d4c.tar.gz
paludis-f6980972b8f3110e9764df4281a683eae0c09d4c.tar.xz
Fix handling of optional empty exlib arrays.
Diffstat (limited to 'paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash')
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash10
1 files changed, 4 insertions, 6 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index f47524d..b72fe4e 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -201,12 +201,10 @@ require()
a_v=$(exparam_var_name ${CURRENT_EXLIB})__ALLDECLS__
for v in ${!a_v}; do
c_v=$(exparam_var_name ${CURRENT_EXLIB})_${v%\[\]}
- if [[ -n ${!c_v+set} ]]; then
- if [[ $(eval "declare -p ${c_v}") == declare\ -a\ ${c_v}=* ]]; then
- [[ ${v} == *\[\] ]] || die "${CURRENT_EXLIB}.exlib requires a scalar ${v} parameter but got an array"
- else
- [[ ${v} != *\[\] ]] || die "${CURRENT_EXLIB}.exlib requires an array ${v} but got a scalar"
- fi
+ if [[ $(eval "declare -p ${c_v}") == declare\ -a\ ${c_v}=* ]]; then
+ [[ ${v} == *\[\] ]] || die "${CURRENT_EXLIB}.exlib requires a scalar ${v} parameter but got an array"
+ elif [[ -n ${!c_v+set} ]]; then
+ [[ ${v} != *\[\] ]] || die "${CURRENT_EXLIB}.exlib requires an array ${v} but got a scalar"
else
die "${CURRENT_EXLIB}.exlib requires a ${v} parameter"
fi