Commit 217bde59 authored by Steven Knight's avatar Steven Knight

Ported function to zsh

parent 8be94d34
# TODO: Need to convert to fish
function pacdisowned function pacdisowned
# tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ if test -d $TMPDIR
# db=$tmp/db set tmp "/tmp"
# fs=$tmp/fs else
set tmp $TMPDIR
end
# mkdir "$tmp" set dir (mktemp -d -p $tmp)
# trap 'rm -rf "$tmp"' EXIT
# pacman -Qlq | sort -u > "$db" set -l fs "$dir/fs"
set -l db "$dir/db"
# find /bin /etc /lib /sbin /usr \ pacman -Qlq | sort -u > "$db"
# ! -name lost+found \
# \( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
# comm -23 "$fs" "$db" 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"
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment