summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorben <benjaminfranzke@gmail.com>2010-01-10 15:50:50 +0100
committerben <benjaminfranzke@gmail.com>2010-01-10 15:50:50 +0100
commit562140dd091796eed00d3e1a87037f34fb27906c (patch)
tree2764895ef64c148a0ead0b42936edda19c2f1c75 /.scripts
parente11f121d32ef0fbdaf1ea083b67f4d979773e61b (diff)
downloaddotfiles-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.sh14
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