diff options
author | ben <benjaminfranzke@gmail.com> | 2010-01-10 15:50:50 +0100 |
---|---|---|
committer | ben <benjaminfranzke@gmail.com> | 2010-01-10 15:50:50 +0100 |
commit | 562140dd091796eed00d3e1a87037f34fb27906c (patch) | |
tree | 2764895ef64c148a0ead0b42936edda19c2f1c75 /.scripts | |
parent | e11f121d32ef0fbdaf1ea083b67f4d979773e61b (diff) | |
download | dotfiles-562140dd091796eed00d3e1a87037f34fb27906c.tar.gz dotfiles-562140dd091796eed00d3e1a87037f34fb27906c.tar.bz2 dotfiles-562140dd091796eed00d3e1a87037f34fb27906c.zip |
added script to find nonexisten installed packages
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 |