From d3dc2002634637bd3635c460c68885bdd755292a Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sat, 5 Nov 2016 18:08:14 -0400 Subject: 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 Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') 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() { -- cgit v1.2.3-70-g09d2