2014-02-26 22:38:57 +00:00
|
|
|
function pacdisowned -d "Display list of disowned files"
|
2014-02-26 22:34:15 +00:00
|
|
|
if test -d $TMPDIR
|
|
|
|
set tmp "/tmp"
|
|
|
|
else
|
|
|
|
set tmp $TMPDIR
|
|
|
|
end
|
2014-02-26 00:36:21 +00:00
|
|
|
|
2014-02-26 22:34:15 +00:00
|
|
|
set dir (mktemp -d -p $tmp)
|
2014-02-26 00:36:21 +00:00
|
|
|
|
2014-02-26 22:34:15 +00:00
|
|
|
set -l fs "$dir/fs"
|
|
|
|
set -l db "$dir/db"
|
2014-02-26 00:36:21 +00:00
|
|
|
|
2014-02-26 22:34:15 +00:00
|
|
|
pacman -Qlq | sort -u > "$db"
|
2014-02-26 00:36:21 +00:00
|
|
|
|
2014-02-26 22:34:15 +00:00
|
|
|
find /bin /etc /lib /sbin /usr ! -name lost+found \
|
|
|
|
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
|
|
|
|
|
|
|
comm -23 "$fs" "$db"
|
|
|
|
|
|
|
|
# clean-up after ourself
|
|
|
|
rm -rf "$dir"
|
2014-02-26 00:36:21 +00:00
|
|
|
end
|
|
|
|
|