[yelp-tools] Accept -h as well as --help



commit 1c32c10b252819b59177f6fc3f357a1cdc05b9fb
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Jun 1 19:20:18 2015 -0400

    Accept -h as well as --help

 tools/yelp-build.in |    6 +++---
 tools/yelp-check.in |   26 +++++++++++++-------------
 2 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/tools/yelp-build.in b/tools/yelp-build.in
index acd42e8..c78db95 100755
--- a/tools/yelp-build.in
+++ b/tools/yelp-build.in
@@ -186,7 +186,7 @@ yelp_cache () {
                 ;;
         esac
     done
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_cache
         exit 1
     fi
@@ -505,7 +505,7 @@ yelp_html () {
         html_custom_dir=`(cd "$html_custom_dir" && pwd)`
         html_custom="$html_custom_dir"/`basename "$html_custom"`
     fi
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_html
         exit 1
     fi
@@ -549,7 +549,7 @@ yelp_epub () {
                 ;;
         esac
     done
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_epub
         exit 1
     fi
diff --git a/tools/yelp-check.in b/tools/yelp-check.in
index 324775e..8f0dcfc 100755
--- a/tools/yelp-check.in
+++ b/tools/yelp-check.in
@@ -276,7 +276,7 @@ yelp_hrefs_page () {
 }
 
 yelp_hrefs () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_hrefs
         exit 1
     fi
@@ -336,7 +336,7 @@ yelp_ids_page () {
 }
 
 yelp_ids () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_ids
         exit 1
     fi
@@ -417,7 +417,7 @@ yelp_links_page () {
 }
 
 yelp_links () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_links
         exit 1
     fi
@@ -437,7 +437,7 @@ yelp_links () {
                 ;;
         esac
     done
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_links
         exit 1
     fi
@@ -494,7 +494,7 @@ yelp_media_page () {
 }
 
 yelp_media () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_media
         exit 1
     fi
@@ -542,7 +542,7 @@ yelp_orphans_page () {
 }
 
 yelp_orphans () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_orphans
         exit 1
     fi
@@ -558,7 +558,7 @@ yelp_orphans () {
                 ;;
         esac
     done
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_orphans
         exit 1
     fi
@@ -596,7 +596,7 @@ yelp_comments_page () {
 }
 
 yelp_comments () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_comments
         exit 1
     fi
@@ -620,7 +620,7 @@ yelp_license_page () {
 }
 
 yelp_license () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_license
         exit 1
     fi
@@ -645,7 +645,7 @@ yelp_license () {
                 ;;
         esac
     done
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_license
         exit 1
     fi
@@ -670,7 +670,7 @@ yelp_license () {
 }
 
 yelp_status () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_status
         exit 1
     fi
@@ -720,7 +720,7 @@ yelp_status () {
                 ;;
         esac
     done
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_status
         exit 1
     fi
@@ -788,7 +788,7 @@ yelp_validate_page () {
 }
 
 yelp_validate () {
-    if [ "$#" = "0" -o "x$1" = "x--help" ]; then
+    if [ "$#" = "0" -o "x$1" = "x--help" -o "x$1" = "x-h" ]; then
         yelp_usage_validate
         exit 1
     fi


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