Define a drop_diversion function in the postrm script

For consistency with other kali-* packages that use a similar diversion
machinery.
This commit is contained in:
Arnaud Rebillout 2022-06-01 14:44:46 +07:00
parent ad1fb8fe56
commit f8e8487d44
No known key found for this signature in database
GPG Key ID: E725E87914600216

View File

@ -33,13 +33,18 @@ FILES_TO_DIVERT="
/etc/xdg/yakuakerc
" # END FILES_TO_DIVERT
drop_diversion() {
local file="$1"
dpkg-divert --rename --package kali-themes \
--divert "$file.original" \
--remove "$file"
}
case "$1" in
remove)
for file in $FILES_TO_DIVERT; do
rm -f "$file"
dpkg-divert --rename --package kali-themes \
--divert "$file.original" \
--remove "$file"
drop_diversion "$file"
done
# Recover GNOME backgrounds
file=/usr/share/gnome-background-properties/gnome-backgrounds.xml