cem-utils

Random utilities
git clone git://git.ckyln.com/~cem/cem-utils.git
Log | Files | Refs | README

commit 8049bd3b16c9a0e5ef903d3249ce2821fe2ff201
parent 696b5e63a512c0972c8e18c67a76bd886c5f38b0
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue, 17 Mar 2020 12:49:27 +0300

add new kiss-stuff

Diffstat:
Mkiss-stuff/Makefile | 3++-
Mkiss-stuff/kiss-repooutdated | 5+++--
Akiss-stuff/kiss-reporevdepends | 16++++++++++++++++
3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/kiss-stuff/Makefile b/kiss-stuff/Makefile @@ -2,10 +2,11 @@ PREFIX = /usr/local BINDIR = ${PREFIX}/bin install: - install -Dm755 -t ${DESTDIR}${BINDIR} kf kiss-repooutdated + install -Dm755 -t ${DESTDIR}${BINDIR} kf kiss-repooutdated kiss-reporevdepends uninstall: rm -f ${DESTDIR}${BINDIR}/kf rm -f ${DESTDIR}${BINDIR}/kiss-repooutdated + rm -f ${DESTDIR}${BINDIR}/kiss-reporevdepends .PHONY: install uninstall diff --git a/kiss-stuff/kiss-repooutdated b/kiss-stuff/kiss-repooutdated @@ -30,8 +30,9 @@ done | (while read -r pkg ; do { # Skip these. # shellcheck disable=2106 { - [ "${rep:--}" = - ] && continue - [ "$ver" = git ] && continue + [ "${rep:--}" = - ] && continue + [ "$ver" = git ] || [ "$ver" = 9999 ] && continue + case "$KISS_REPO_IGNORE" in *$pkg*) continue ;; esac } # Split the comma separated list. diff --git a/kiss-stuff/kiss-reporevdepends b/kiss-stuff/kiss-reporevdepends @@ -0,0 +1,16 @@ +#!/bin/sh +# +# kiss-revdepends - Display packages which depend on package. + +# 'cd' to the database directory as a simple way of +# stripping the path and performing a 'basename'. +[ "$1" ] || exit 1 + +# Word splitting is in + +for repo in $(echo "$KISS_PATH" | tr ':' ' ') ; do + + cd "$repo/.." ||: + # Use a simple 'grep' to display packages depending on '$1'. + grep "^$1" -- "${repo##*/}"/*/depends +done