diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-05-02 21:54:36 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-05-12 13:16:03 +0200 |
commit | 2b4c996b86782ee7280f5c6de1ef873ed9858f7a (patch) | |
tree | fd972c7250fb099929bd4a1030ee17a3d23d1397 | |
parent | 542c3cf812e32989610cb09f40dbc237f2fba9bb (diff) | |
download | pacman-2b4c996b86782ee7280f5c6de1ef873ed9858f7a.tar.gz pacman-2b4c996b86782ee7280f5c6de1ef873ed9858f7a.tar.xz |
libmakepkg: don't save/set/restore extglob in bash [[ tests
Since bash 4.1 extglobs can be used within [[ ... ]] regardless of
whether the shopt is set. Our configure.ac requires bash 4.1.0 at a
minimum for pacman scripts.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | scripts/libmakepkg/util/util.sh.in | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/scripts/libmakepkg/util/util.sh.in b/scripts/libmakepkg/util/util.sh.in index 726d2005..c2f9c624 100644 --- a/scripts/libmakepkg/util/util.sh.in +++ b/scripts/libmakepkg/util/util.sh.in @@ -42,15 +42,10 @@ is_array() { local v=$1 local ret=1 - # this function requires extglob - save current status to restore later - local shellopts=$(shopt -p extglob) - shopt -s extglob - if [[ $(declare -p "$v") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then ret=0 fi - eval "$shellopts" return $ret } |