summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 179746d2..94cb942e 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -673,6 +673,8 @@ run_build() {
# ensure all necessary build variables are exported
export CFLAGS CXXFLAGS MAKEFLAGS CHOST
+ # save our shell options so build() can't override what we need
+ local shellopts=$(shopt -p)
local ret=0
if [ "$LOGGING" = "1" ]; then
@@ -693,6 +695,8 @@ run_build() {
else
build 2>&1 || ret=$?
fi
+ # reset our shell options
+ eval "$shellopts"
if [ $ret -gt 0 ]; then
error "$(gettext "Build Failed.")"