summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-01-08 12:54:35 +0100
committerDan McGee <dan@archlinux.org>2012-01-08 19:03:56 +0100
commit2b38f4eab7684e0f1e78b0b10953bf28915e963a (patch)
tree1c8703c1a334241c7be3c4be4096386ece37ef3e
parent36413aa856a7cace1851679c1398403b30417e80 (diff)
downloadpacman-2b38f4eab7684e0f1e78b0b10953bf28915e963a.tar.gz
pacman-2b38f4eab7684e0f1e78b0b10953bf28915e963a.tar.xz
makepkg: fix missing source file detection
Declaring the variable as local on the same line as the assignment results in result of the assignment being returned rather than the result of the function on the righthand side of the assignment. Declaring the variable as local on a separate line means the result of the function on the r.h.s. is returned and our error function will be invoked if necessary (although it is practically impossible to ever trigger it...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d25582f3..a700d9d0 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -624,7 +624,8 @@ generate_checksums() {
local netfile
for netfile in "${source[@]}"; do
- local file="$(get_filepath "$netfile")" || missing_source_file "$netfile"
+ local file
+ file="$(get_filepath "$netfile")" || missing_source_file "$netfile"
local sum="$(openssl dgst -${integ} "$file")"
sum=${sum##* }
(( ct )) && echo -n "$indent"