summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2016-11-05 18:08:14 -0400
committerAllan McRae <allan@archlinux.org>2016-12-05 15:20:08 +1000
commitd3dc2002634637bd3635c460c68885bdd755292a (patch)
treefe3e642538c812aec3bb07a139754593352a25e1 /scripts
parent7114ca6208d3dffe685b994f0802c90727303fc8 (diff)
makepkg: fix find_lib{depends, provides} results
Neither function was checking for the existence of actual results before calling printf, resulting in them returning a list with a single empty value if there were no depends/provides. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index e7a506fb..7538c8fa 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -497,7 +497,7 @@ find_libdepends() {
done
if (( sodepends == 0 )); then
- printf '%s\n' "${depends[@]}"
+ (( ${#depends[@]} )) && printf '%s\n' "${depends[@]}"
return;
fi
@@ -546,7 +546,7 @@ find_libdepends() {
esac
done
- printf '%s\n' "${libdepends[@]}"
+ (( ${#libdepends[@]} )) && printf '%s\n' "${libdepends[@]}"
}
@@ -597,7 +597,7 @@ find_libprovides() {
fi
done
- printf '%s\n' "${libprovides[@]}"
+ (( ${#libprovides[@]} )) && printf '%s\n' "${libprovides[@]}"
}
write_pkginfo() {