From 2b4c996b86782ee7280f5c6de1ef873ed9858f7a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 2 May 2018 15:54:36 -0400 Subject: 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 Signed-off-by: Allan McRae --- scripts/libmakepkg/util/util.sh.in | 5 ----- 1 file changed, 5 deletions(-) (limited to 'scripts') 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 } -- cgit v1.2.3-70-g09d2