aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpkgconfigdeps.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgconfigdeps.sh b/pkgconfigdeps.sh
index 08713be..da6e9aa 100755
--- a/pkgconfigdeps.sh
+++ b/pkgconfigdeps.sh
@@ -28,7 +28,9 @@ case $1 in
# We have a dependency. Make a note that we need the pkgconfig
# tool for this package.
test -z "$v" && test -n "$r" && echo "Error with pkgconfig($n)" >&2 && exit 1
- echo "pkgconfig($n)" "$r" "$v"
+ echo -n "pkgconfig($n) "
+ [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v"
+ echo
done
test ${PIPESTATUS[0]} -ne 0 && echo "$pkgconfig returned an error" >&2 && exit 1
# The dependency on the pkgconfig package itself.
@@ -44,7 +46,10 @@ case $1 in
export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
$pkgconfig --print-errors --print-requires --print-requires-private $filename | while read n r v ; do
test -z "$v" && test -n "$r" && echo "Error with pkgconfig($n)" >&2 && exit 1
- echo "pkgconfig($n)" "$r" "$v"
+ [ -n "$n" ] || continue
+ echo -n "pkgconfig($n) "
+ [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v"
+ echo
done
test ${PIPESTATUS[0]} -ne 0 && echo "$pkgconfig returned an error" >&2 && exit 1
esac