index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-03-19 23:05:21 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-04-29 21:34:43 +1000 |
commit | bcaf1b84ff0f0709d35cd0adb1f13965d1101aeb (patch) | |
tree | 0f8b46ac04c179d334ef20e12a7e1b8c18cf1ee6 /scripts/libmakepkg/util/pkgbuild.sh.in | |
parent | 27f64e378958204314a17b5c5416bd40f47603ac (diff) |
-rw-r--r-- | scripts/libmakepkg/util/pkgbuild.sh.in | 6 |
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 } |