blob: fc2681031ab8ffe55352a0a1e7068fca36608f55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
for file; do
pkgname=$(pacman -Qqo "$file" | pacman -Q - | tr ' ' '-')
pkg=$(find /var/cache/pacman -name "${pkgname}-*.pkg.tar.zst")
if [ -z "$pkg" ]; then
printf "Failed to find '%s' in pacman cache\n" "$file"
else
printf '%s:%s <-> %s\n' "$pkg" "${file#/}" "$file"
bsdtar -xOf "$pkg" "${file#/}" | diff - "$file"
fi
done
|