diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-08-13 21:20:57 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-08-29 14:56:20 +1000 |
commit | 48c8f9f2a24632dabe5b1c74a474e3940ddd8748 (patch) | |
tree | c180560584066ebe42f664c2ccd359c3dbb79183 /scripts | |
parent | 0696307a3b2e0cbde7d208eb78bbad6a9c8b336f (diff) | |
download | pacman-48c8f9f2a24632dabe5b1c74a474e3940ddd8748.tar.xz |
makepkg: don't save the same shopts twice
Both run_function and run_function_safe will save and restore `shopt -p`
but the former is only called from the latter. It makes sense to save
this as part of a "safe" runner, so let's just do it in one place, there
where we save and restore everything else too.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/makepkg.sh.in | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 39983fcd..76b9322a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -447,9 +447,6 @@ run_function() { msg "$(gettext "Starting %s()...")" "$pkgfunc" cd_safe "$srcdir" - # save our shell options so pkgfunc() can't override what we need - local shellopts=$(shopt -p) - local ret=0 if (( LOGGING )); then local fullver=$(get_full_version) @@ -479,8 +476,6 @@ run_function() { else "$pkgfunc" fi - # reset our shell options - eval "$shellopts" } run_prepare() { |