pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_alternatives Update to 1.3: show a more d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8b3ff550cdd0
branches:  trunk
changeset: 488852:8b3ff550cdd0
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Thu Feb 10 10:18:03 2005 +0000

description:
Update to 1.3: show a more descriptive usage message, useful as a quick
reference.  Per tv@'s suggestion.

diffstat:

 pkgtools/pkg_alternatives/Makefile                  |   4 ++--
 pkgtools/pkg_alternatives/files/pkg_alternatives.sh |  20 ++++++++++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diffs (49 lines):

diff -r a19702918b45 -r 8b3ff550cdd0 pkgtools/pkg_alternatives/Makefile
--- a/pkgtools/pkg_alternatives/Makefile        Thu Feb 10 08:55:04 2005 +0000
+++ b/pkgtools/pkg_alternatives/Makefile        Thu Feb 10 10:18:03 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2005/01/30 12:35:22 jmmv Exp $
+# $NetBSD: Makefile,v 1.4 2005/02/10 10:18:03 jmmv Exp $
 #
 
-DISTNAME=      pkg_alternatives-1.2
+DISTNAME=      pkg_alternatives-1.3
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r a19702918b45 -r 8b3ff550cdd0 pkgtools/pkg_alternatives/files/pkg_alternatives.sh
--- a/pkgtools/pkg_alternatives/files/pkg_alternatives.sh       Thu Feb 10 08:55:04 2005 +0000
+++ b/pkgtools/pkg_alternatives/files/pkg_alternatives.sh       Thu Feb 10 10:18:03 2005 +0000
@@ -1,6 +1,6 @@
 #!@SH@
 #
-# $NetBSD: pkg_alternatives.sh,v 1.4 2005/01/30 12:35:22 jmmv Exp $
+# $NetBSD: pkg_alternatives.sh,v 1.5 2005/02/10 10:18:03 jmmv Exp $
 #
 # pkg_alternatives - Generic wrappers for programs with similar interfaces
 # Copyright (c) 2005 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
@@ -539,7 +539,23 @@
 # Shows an usage message and exits the program with an error condition.
 #
 usage() {
-    echo "Usage: ${Prog_Name} [-gsw] [-p prefix] action [arg1 ... argN]" 1>&2
+    cat 1>&2 <<EOF
+Usage: ${Prog_Name} [options] action [arg1 ... argN]
+
+Available options:
+    -g        Select group mode (default).
+    -p dir    Set installation prefix.
+    -s        Run in silent mode.
+    -w        Select wrapper mode.
+
+Available actions in group mode:
+    auto destroy list manual rebuild register status unregister
+
+Available actions in wrapper mode:
+    auto manual register status unregister
+
+See pkg_alternatives(8) for more information.
+EOF
     exit 1
 }
 



Home | Main Index | Thread Index | Old Index