aboutsummaryrefslogtreecommitdiffstats
path: root/bin/pacman-disowned
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pacman-disowned')
-rwxr-xr-xbin/pacman-disowned16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/pacman-disowned b/bin/pacman-disowned
new file mode 100755
index 0000000..df1b5da
--- /dev/null
+++ b/bin/pacman-disowned
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
+db=$tmp/db
+fs=$tmp/fs
+
+mkdir "$tmp"
+trap 'rm -rf "$tmp"' EXIT
+
+pacman -Qlq | sort -u > "$db"
+
+find /bin /etc /lib /sbin /usr \
+ ! -name lost+found \
+ \( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
+
+comm -23 "$fs" "$db"