diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-03-10 04:45:00 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-03-14 02:47:11 +0100 |
commit | 6c870953c563c69c7e833637fec292e291511b45 (patch) | |
tree | 12b79af023f8264a696fbb6d12a29d22dc774b95 | |
parent | 63f04177c3987b5e4562d04ea05c867e56dabb9b (diff) | |
download | pacman-6c870953c563c69c7e833637fec292e291511b45.tar.gz pacman-6c870953c563c69c7e833637fec292e291511b45.tar.xz |
pkgdelta: fix improper passing of file argument
Looks like I hosed this pretty hard in 5a5e712c749edb8.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | scripts/pkgdelta.sh.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in index a6aad3f6..39046b87 100644 --- a/scripts/pkgdelta.sh.in +++ b/scripts/pkgdelta.sh.in @@ -75,6 +75,7 @@ isnumeric() { } read_pkginfo() { + unset pkgver pkgname arch while IFS='=' read -r field value; do # skip comments and invalid lines [[ $field = '#'* || -z $value ]] && continue @@ -82,10 +83,10 @@ read_pkginfo() { # skip lines which aren't fields we care about [[ $field != @(pkgver|pkgname|arch) ]] || continue - declare "$field=$value" + declare -g "${field% }=${value# }" [[ $pkgname && $pkgver && $arch ]] && return 0 - done + done < <(bsdtar -xOqf "$1" .PKGINFO 2>/dev/null) error "$(gettext "Invalid package file '%s'.")" "$1" return 1 |