monotone-commits-diffs
[Top][All Lists]
Advanced

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

[Monotone-commits-diffs] net.venge.monotone.contrib.usher: 2db50a38ae83c


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.contrib.usher: 2db50a38ae83ca4e19ddf1bb0ab1b9c3bc112d0d
Date: Wed, 27 Apr 2011 17:13:34 +0200 (CEST)

revision:            2db50a38ae83ca4e19ddf1bb0ab1b9c3bc112d0d
date:                2011-04-27T08:27:00
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone.contrib.usher
changelog:
* utils/usherctl.in: Simplify the getopt calls, as we don't necessarely
  have the GNU variant present...

manifest:
format_version "1"

new_manifest [a3904a67d5b8782054ccf112b4497f19a6e06918]

old_revision [79d24db216149f6d4a9c62d5d16c27d44f91344d]

patch "utils/usherctl.in"
 from [974b76606f422a2c03cdcde8ff4e781730a82b6f]
   to [880a672ad51f6f6ddb1ebbac18a38f1b2942ccee]
============================================================
--- utils/usherctl.in	974b76606f422a2c03cdcde8ff4e781730a82b6f
+++ utils/usherctl.in	880a672ad51f6f6ddb1ebbac18a38f1b2942ccee
@@ -52,7 +52,10 @@ config_file="@sysconfdir@/usher/usherctl
 
 config_file="@sysconfdir@/usher/usherctl.conf"
 
-TEMP=`POSIXLY_CORRECT=yes getopt -o c: -n usherctl -- "$@"`
+if ! TEMP=`POSIXLY_CORRECT=yes getopt c: "$@"`; then
+    echo "Usage: usherctl [ -c configfile ] [--] command [options] args..."
+fi
+
 eval set -- "$TEMP"
 while true; do
     case "$1" in
@@ -736,7 +739,9 @@ case $1 in
 	adminpass=admin
 	listenaddr=0.0.0.0:4691
 	adminaddr=127.0.0.1:12345
-	TEMP=`POSIXLY_CORRECT=yes getopt -o A:a:l:u:p: -n "usherctl init" -- "$@"`
+	if ! TEMP=`POSIXLY_CORRECT=yes getopt A:a:l:u:p: "$@"`; then
+	    echo >&2 "Usage: usherctl init [ -A adminaddr ] [ -a automateaddr ] [ -l listenaddr ] [ -u adminuser ] [ -p adminpass ]"
+	fi
 	eval set -- "$TEMP"
 	while true; do
 	    case "$1" in
@@ -796,7 +801,9 @@ case $1 in
 
 	host=
 	pattern=
-	TEMP=`POSIXLY_CORRECT=yes getopt -o h:p: -n "usherctl $op" -- "$@"`
+	if ! TEMP=`POSIXLY_CORRECT=yes getopt h:p: "$@"`; then
+	    echo >&2 "Usage: usherctl $op [ -h host ] [ -p pattern ] local|remote args..."
+	fi
 	eval set -- "$TEMP"
 	while true; do
 	    case "$1" in
@@ -871,7 +878,9 @@ case $1 in
 	d=
 	p=
 	t=
-	TEMP=`POSIXLY_CORRECT=yes getopt -o cdpt -n "usherctl info" -- "$@"`
+	if ! TEMP=`POSIXLY_CORRECT=yes getopt cdpt "$@"`; then
+	    echo >&2 "Usage: usherctl info [ -cdpt ]"
+	fi
 	eval set -- "$TEMP"
 	while true; do
 	    case "$1" in
@@ -916,7 +925,9 @@ case $1 in
 
 	type=ro
 	key=
-	TEMP=`POSIXLY_CORRECT=yes getopt -o t: -n "usherctl addkey" -- "$@"`
+	if ! TEMP=`POSIXLY_CORRECT=yes getopt t: "$@"`; then
+	    echo >&2 "Usage: usherctl addkey [ -t keytype ]"
+	fi
 	eval set -- "$TEMP"
 	while true; do
 	    case "$1" in

reply via email to

[Prev in Thread] Current Thread [Next in Thread]