summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2008-05-21 15:24:40 +0000
committertnn <tnn@pkgsrc.org>2008-05-21 15:24:40 +0000
commit14c8f53a73a18d06927e57a794250b3ff4ac0ab4 (patch)
treee85eab8a7928fc483b41b8934e1256f6ea3e7f16 /pkgtools
parent9a4d5e9b813ff0ab2c04cdc8b28e54cd07e5d4ce (diff)
downloadpkgsrc-14c8f53a73a18d06927e57a794250b3ff4ac0ab4.tar.gz
- Actually show usage() instead of entering an infinite loop.
- improve usage - bump version to 1.1
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_leaves/Makefile4
-rw-r--r--pkgtools/pkg_leaves/files/pkg_leaves16
2 files changed, 14 insertions, 6 deletions
diff --git a/pkgtools/pkg_leaves/Makefile b/pkgtools/pkg_leaves/Makefile
index 9dacaddab85..347de003620 100644
--- a/pkgtools/pkg_leaves/Makefile
+++ b/pkgtools/pkg_leaves/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/05/15 17:44:42 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2008/05/21 15:24:40 tnn Exp $
-DISTNAME= pkg_leaves-1.0
+DISTNAME= pkg_leaves-1.1
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkg_leaves/files/pkg_leaves b/pkgtools/pkg_leaves/files/pkg_leaves
index 7e21b8d3c32..5eb7b8869ea 100644
--- a/pkgtools/pkg_leaves/files/pkg_leaves
+++ b/pkgtools/pkg_leaves/files/pkg_leaves
@@ -32,10 +32,15 @@ skip_manual=yes
usage()
{
- echo "$0 [-a] [-K pkg_dbdir]"
- echo "Print all automatically installed leaf packages."
- echo "If -a is specified, print all leaf packages."
- exit 1
+cat << EOF
+usage: $(basename "$0") [-a] [-K pkg_dbdir]
+ Prints all automatically installed leaf packages.
+
+ -a Print all leaf packages, including manually installed ones.
+ -K <dir> Specify alternate package database (default: ${PKG_DBDIR})
+
+EOF
+exit 1
}
while [ $# -gt 0 ] ; do
@@ -49,6 +54,9 @@ while [ $# -gt 0 ] ; do
shift
shift
;;
+ *)
+ usage
+ ;;
esac
done