From c68dffa6c42334cfa939fb21a5430a35abff08c0 Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 13 May 2020 19:51:21 +0000 Subject: contrib: use --help and -h for usage information FossilOrigin-Name: 43f55b077d3feb3e4bc42d72a58cadedbe7f387cedf01d2e59308c35f6afb484 --- contrib/kiss-orphans | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'contrib/kiss-orphans') diff --git a/contrib/kiss-orphans b/contrib/kiss-orphans index d8f6776..7ffc939 100755 --- a/contrib/kiss-orphans +++ b/contrib/kiss-orphans @@ -1,6 +1,12 @@ #!/bin/sh -e # List orphaned packages +case "$1" in ''|--help|-h) + printf '\033[1;33m-> \033[m%s\n' \ + "${0##*/}: lists packages that do not have any packages depending on them" >&2 + exit 0 +esac + cd "$KISS_ROOT/var/db/kiss/installed/" for pkg in *; do @@ -12,6 +18,3 @@ for pkg in *; do grep -q "^$pkg$" ./*/depends || printf '%s\n' "$pkg" done - -printf '\033[1;33m-> \033[m%s\n' "kiss-orphans: lists packages that do not" \ - "have any packages depending on them" >&2 -- cgit v1.2.3