[devscripts] 01/01: debrepro: Add --help and display options in usage
James McCoy
jamessan at debian.org
Mon Jan 15 02:31:56 UTC 2018
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 3e375a9843f3e99823a0cb673bf5a3b804eb5430
Author: James McCoy <jamessan at debian.org>
Date: Sun Jan 14 21:25:26 2018 -0500
debrepro: Add --help and display options in usage
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 4 ++++
scripts/debrepro.pod | 4 ++++
scripts/debrepro.sh | 10 ++++++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 47b1734..16b7a52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,10 @@ devscripts (2.18.1) UNRELEASED; urgency=medium
* uscan: clarify importance of version=4. Closes: #884880
* uscan: add hrefdecode option. Closes: #884604
+ [ James McCoy ]
+ * debrepro:
+ + Add a --help option and include options description in the usage output.
+
-- Mattia Rizzolo <mattia at debian.org> Wed, 03 Jan 2018 14:31:54 +0100
devscripts (2.17.12) unstable; urgency=medium
diff --git a/scripts/debrepro.pod b/scripts/debrepro.pod
index 4f83d48..6508d03 100644
--- a/scripts/debrepro.pod
+++ b/scripts/debrepro.pod
@@ -98,6 +98,10 @@ future with regards to the current time (using B<faketime(1)>).
Don't perform the named VARIATION. Variation names are the ones used in
their description in section B<SUPPORTED VARIATIONS>.
+=item -h, --help
+
+Display this help message and exit.
+
=back
=head1 EXIT STATUS
diff --git a/scripts/debrepro.sh b/scripts/debrepro.sh
index ec16858..8bd354a 100755
--- a/scripts/debrepro.sh
+++ b/scripts/debrepro.sh
@@ -43,6 +43,8 @@ usage() {
echo ""
echo "Options:"
echo ""
+ echo " -s,--skip VARIATION Don't perform the named variation"
+ echo " -h,--help Display this help message and exit"
}
first_banner=y
@@ -171,8 +173,8 @@ compare() {
return "$rc"
}
-TEMP=$(getopt -n "debrepro" -o 's:' \
- -l 'skip:' \
+TEMP=$(getopt -n "debrepro" -o 'hs:' \
+ -l 'help,skip:' \
-- "$@") || (rc=$?; usage >&2; exit $rc)
eval set -- "$TEMP"
@@ -191,6 +193,10 @@ while true; do
esac
shift
;;
+ -h|--help)
+ usage
+ exit
+ ;;
--)
shift
break
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list