summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/util/pkgbuild.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/util/pkgbuild.sh.in')
-rw-r--r--scripts/libmakepkg/util/pkgbuild.sh.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in
index 25ad03ce..d35c064b 100644
--- a/scripts/libmakepkg/util/pkgbuild.sh.in
+++ b/scripts/libmakepkg/util/pkgbuild.sh.in
@@ -80,6 +80,10 @@ extract_function_variable() {
printf -v attr_regex '^[[:space:]]* %s\+?=[^(]' "$2"
fi
+ # save our shell options and turn on extglob
+ local shellopts=$(shopt -p)
+ shopt -s extglob
+
while read -r; do
# strip leading whitespace and any usage of declare
decl=${REPLY##*([[:space:]])}
@@ -89,6 +93,8 @@ extract_function_variable() {
r=0
done < <(grep_function "$funcname" "$attr_regex")
+ eval "$shellopts"
+
return $r
}