1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-24 16:10:05 -07:00
kiss/contrib/kiss-orphans
2020-09-24 09:16:31 +03:00

16 lines
345 B
Bash
Executable File

#!/bin/sh -e
# List orphaned packages
cd "$KISS_ROOT/var/db/kiss/installed"
# List of installed packages.
printf -- '%s\n' * > "${TMPDIR:-/tmp}/packages"
# List of runtime dependencies.
grep -hv ' make\|^#' ./*/depends | sort -u |
# Remove items in list 2 from list 1.
comm -23 "${TMPDIR:-/tmp}/packages" -
rm -f "${TMPDIR:-/tmp}/packages"