diff options
Diffstat (limited to '.scripts')
-rw-r--r-- | .scripts/find_nonexistent_installed_packages.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.scripts/find_nonexistent_installed_packages.sh b/.scripts/find_nonexistent_installed_packages.sh new file mode 100644 index 0000000..9baacbf --- /dev/null +++ b/.scripts/find_nonexistent_installed_packages.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +source "/etc/make.conf" +installed=$(find /var/db/pkg -maxdepth 2 -mindepth 2 -printf "%P\n" | xargs qatom | awk '{print $1 "/" $2}') + +for package in ${installed} +do + found=0 + for overlay in "/usr/portage/" ${PORTDIR_OVERLAY} + do + [[ -d "${overlay}/${package}" ]] && found=1 + done + [[ "${found}" -eq 0 ]] && echo "${package}" +done |