makepkg: save and restore shopts when sourcing /etc/profile

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2012-03-31 17:26:39 +10:00 committed by Dan McGee
parent 468270ce4f
commit 31091963ed
1 changed files with 4 additions and 0 deletions

View File

@ -473,7 +473,11 @@ handle_deps() {
fi
# we might need the new system environment
# save our shell options and turn off extglob
local shellopts=$(shopt -p)
shopt -u extglob
source /etc/profile &>/dev/null
eval "$shellopts"
return $R_DEPS_SATISFIED
}