makepkg: Only backup package variables once

We don't need to re-backup the variables we restored on the previous
iteration.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Jan Alexander Steffens (heftig) 2019-01-04 12:57:22 +10:00 committed by Allan McRae
parent e1fc2f901e
commit 7c5958e0eb

View file

@ -924,10 +924,10 @@ restore_package_variables() {
run_split_packaging() {
local pkgname_backup=("${pkgname[@]}")
backup_package_variables
for pkgname in ${pkgname_backup[@]}; do
pkgdir="$pkgdirbase/$pkgname"
mkdir "$pkgdir"
backup_package_variables
run_package $pkgname
tidy_install
lint_package || exit $E_PACKAGE_FAILED