[devscripts] 03/05: mergechanges: Deduplicate the command synopsis message
James McCoy
jamessan at debian.org
Wed Jun 10 03:34:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit cf17d775eb6bb780e69575bb418473b55daede02
Author: James McCoy <jamessan at debian.org>
Date: Tue Jun 9 22:52:00 2015 -0400
mergechanges: Deduplicate the command synopsis message
Signed-off-by: James McCoy <jamessan at debian.org>
---
scripts/mergechanges.sh | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/scripts/mergechanges.sh b/scripts/mergechanges.sh
index 0be26e0..0cf4526 100755
--- a/scripts/mergechanges.sh
+++ b/scripts/mergechanges.sh
@@ -23,14 +23,19 @@ set -e
PROGNAME=`basename $0`
+synopsis () {
+ echo "Usage: $PROGNAME [-h|--help|--version] [-i|--indep] [-f] <file1> <file2> [<file> ...]"
+}
+
usage () {
- echo \
-"Usage: $PROGNAME [-h|--help|--version] [-i|--indep] [-f] <file1> <file2> [<file> ...]
+ synopsis
+ echo <<EOT
Merge the changes files <file1>, <file2>, .... Output on stdout
unless -f option given, in which case, output to
<package>_<version>_multi.changes in the same directory as <file1>.
If -i is given, only source and architecture-independent packages
are included in the output."
+EOT
}
version () {
@@ -78,7 +83,7 @@ done
# Sanity check #0: Do we have enough parameters?
if [ $# -lt 2 ]; then
echo "Not enough parameters." >&2
- echo "Usage: mergechanges [--help|--version] [-f] <file1> <file2> [<file...>]" >&2
+ synopsis >&2
exit 1
fi
--
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