[yelp-tools] yelp-check: Exit status for links and orphans
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-tools] yelp-check: Exit status for links and orphans
- Date: Thu, 5 May 2011 16:08:51 +0000 (UTC)
commit 9a5acedbbef039f3b15c7a06b225dde46c47cb40
Author: Shaun McCance <shaunm gnome org>
Date: Thu May 5 12:16:58 2011 -0400
yelp-check: Exit status for links and orphans
tools/yelp-check.in | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/tools/yelp-check.in b/tools/yelp-check.in
index 0f7ca9b..805a612 100755
--- a/tools/yelp-check.in
+++ b/tools/yelp-check.in
@@ -143,6 +143,7 @@ yelp_links () {
check_cache_file=`mktemp`
yelp-build cache -o "$check_cache_file" "$@"
fi
+ check_out_file=`mktemp`
for xml in "$@"; do
if [ -d "$xml" ]; then
for page in "$xml"/*.page; do
@@ -151,10 +152,15 @@ yelp_links () {
else
yelp_links_page "$xml"
fi
- done
+ done > "$check_out_file"
+ ret=`cat "$check_out_file" | wc -l`
+ if test "x$ret" != "x0"; then ret="1"; fi
+ cat "$check_out_file"
if [ "x$check_cache_file_is_tmp" = "xyes" ]; then
rm "$check_cache_file"
fi
+ rm "$check_out_file"
+ exit $ret
}
yelp_orphans_page () {
@@ -207,6 +213,7 @@ yelp_orphans () {
check_cache_file=`mktemp`
yelp-build cache -o "$check_cache_file" "$@"
fi
+ check_out_file=`mktemp`
for xml in "$@"; do
if [ -d "$xml" ]; then
for page in "$xml"/*.page; do
@@ -215,10 +222,15 @@ yelp_orphans () {
else
yelp_orphans_page "$xml"
fi
- done
+ done > "$check_out_file"
+ ret=`cat "$check_out_file" | wc -l`
+ if test "x$ret" != "x0"; then ret="1"; fi
+ cat "$check_out_file"
if [ "x$check_cache_file_is_tmp" = "xyes" ]; then
rm "$check_cache_file"
fi
+ rm "$check_out_file"
+ exit $ret
}
yelp_validate_page () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]