index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-03-14 23:13:31 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-03-15 14:39:31 +1000 |
commit | 9e52a36794552b77ecf26f7f34b226d096978f1e (patch) | |
tree | 15396663caafff142394868c1dc814cf200d5a72 /scripts/makepkg.sh.in | |
parent | f054351e528eebf985378f2f4cb0f621ca15023d (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 20 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 96a96483..bc2d0061 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1115,34 +1115,22 @@ check_build_status() { backup_package_variables() { local var for var in ${splitpkg_overrides[@]}; do - local indirect="${var}_backup" - eval "${indirect}=(\"\${$var[@]}\")" - done -} - -restore_package_variables() { - local var - for var in ${splitpkg_overrides[@]}; do - local indirect="${var}_backup" - if [[ -n ${!indirect} ]]; then - eval "${var}=(\"\${$indirect[@]}\")" - else - unset ${var} - fi + declare -p $var 2>/dev/null || printf '%s\n' "unset $var" done } run_split_packaging() { local pkgname_backup=("${pkgname[@]}") + local restore_package_variables for pkgname in ${pkgname_backup[@]}; do pkgdir="$pkgdirbase/$pkgname" mkdir "$pkgdir" - backup_package_variables + restore_package_variables="$(backup_package_variables)" run_package $pkgname tidy_install lint_package || exit $E_PACKAGE_FAILED create_package - restore_package_variables + eval "$restore_package_variables" done pkgname=("${pkgname_backup[@]}") create_debug_package |