[yelp-tools] yelp-check: Fix pipe flow for license
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-tools] yelp-check: Fix pipe flow for license
- Date: Fri, 19 Jun 2015 16:29:19 +0000 (UTC)
commit fefaa9b9f60c187b5ed63d8771bcdc43fad683b8
Author: Shaun McCance <shaunm gnome org>
Date: Fri Jun 19 12:22:01 2015 -0400
yelp-check: Fix pipe flow for license
Getting return values for commands in a pipeline is hard. I did it
wrong. I'm giving up for now for license, since error exits aren't
normal for the license subcommand.
tools/yelp-check.in | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/tools/yelp-check.in b/tools/yelp-check.in
index 05de8fc..ef2fe48 100755
--- a/tools/yelp-check.in
+++ b/tools/yelp-check.in
@@ -735,13 +735,12 @@ yelp_license () {
fi
check_db=
check_page=yelp_license_page
- yelp_check_iter_args $@ || exit 1 | \
- if [ "x$check_totals" = "x1" ]; then
+ if [ "x$check_totals" = "x1" ]; then
+ yelp_check_iter_args $@ | \
sort | uniq -c | sed -e 's/^ *//' | awk '{print $2 ": " $1}'
- else
- sort
- fi
- exit $yelp_check_retval
+ else
+ yelp_check_iter_args $@ | sort
+ fi
}
yelp_status () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]