[pacman-dev,06/10] makepkg: Only backup package variables once

Message ID f123f0156bbe420827b94cc31365beeb2b3200b5.1527783895.git.jan.steffens@gmail.com
State Superseded, archived
Headers show
Series [pacman-dev,01/10] libmakepkg/util/option: Refactor checking to reduce code duplication | expand

Commit Message

Jan Alexander Steffens May 31, 2018, 4:24 p.m. UTC
We don't need to re-backup the variables we restored on the previous
iteration.
---
 scripts/makepkg.sh.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 86af4675..84ae08db 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1134,9 +1134,8 @@  run_solo_packaging() {
 
 run_split_packaging() {
 	local pkgname_backup=("${pkgname[@]}")
-	local restore_package_variables
+	local restore_package_variables="$(backup_package_variables)"
 	for pkgname in ${pkgname_backup[@]}; do
-		restore_package_variables="$(backup_package_variables)"
 		run_solo_packaging $pkgname
 		eval "$restore_package_variables"
 	done