[yelp-tools] yelp-check: Don't exit shell from validate_page



commit 0a9597e318f419b0bfc6acc03bdfdb7312647b57
Author: Shaun McCance <shaunm gnome org>
Date:   Thu May 5 12:29:32 2011 -0400

    yelp-check: Don't exit shell from validate_page

 tools/yelp-check.in |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/tools/yelp-check.in b/tools/yelp-check.in
index 805a612..a72cf8d 100755
--- a/tools/yelp-check.in
+++ b/tools/yelp-check.in
@@ -243,23 +243,25 @@ yelp_validate_page () {
     ret="$?"
     cat "$check_out_file" | grep -v 'validates$'
     rm "$check_rng_file" "$check_out_file"
-    exit $ret;
+    return $ret;
 }
 
 yelp_validate () {
     if [ "$#" = "0" -o "x$1" = "x--help" ]; then
-        yelp_usage_orphans
+        yelp_usage_validate
         exit 1
     fi
+    gret="0"
     for xml in "$@"; do
         if [ -d "$xml" ]; then
             for page in "$xml"/*.page; do
-                yelp_validate_page "$page"
+                yelp_validate_page "$page" || gret="$?"
             done
         else
-            yelp_validate_page "$xml"
+            yelp_validate_page "$xml" || gret="$?"
         fi
     done
+    exit "$gret"
 }
 
 cmd="$1"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]