aboutsummaryrefslogtreecommitdiff
path: root/contrib/cpt-revdepends
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cpt-revdepends')
-rwxr-xr-xcontrib/cpt-revdepends8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/cpt-revdepends b/contrib/cpt-revdepends
index db5b796..5857da1 100755
--- a/contrib/cpt-revdepends
+++ b/contrib/cpt-revdepends
@@ -1,7 +1,13 @@
#!/bin/sh -e
# Display packages which depend on package
-case "$1" in ''|--help|-h) printf '%s\n' "usage: ${0##*/} [pkg]" ; exit 0 ; esac
+case "$1" in
+ --help|-h)
+ printf '%s\n' "usage: ${0##*/} [pkg]"
+ exit 0
+ ;;
+ '') set -- "${PWD##*/}"
+esac
# 'cd' to the database directory as a simple way of
# stripping the path and performing a 'basename'.