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:
parent
ad1fb8fe56
commit
f8e8487d44
11
debian/kali-themes.postrm
vendored
11
debian/kali-themes.postrm
vendored
@ -33,13 +33,18 @@ FILES_TO_DIVERT="
|
|||||||
/etc/xdg/yakuakerc
|
/etc/xdg/yakuakerc
|
||||||
" # END FILES_TO_DIVERT
|
" # END FILES_TO_DIVERT
|
||||||
|
|
||||||
|
drop_diversion() {
|
||||||
|
local file="$1"
|
||||||
|
dpkg-divert --rename --package kali-themes \
|
||||||
|
--divert "$file.original" \
|
||||||
|
--remove "$file"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
remove)
|
remove)
|
||||||
for file in $FILES_TO_DIVERT; do
|
for file in $FILES_TO_DIVERT; do
|
||||||
rm -f "$file"
|
rm -f "$file"
|
||||||
dpkg-divert --rename --package kali-themes \
|
drop_diversion "$file"
|
||||||
--divert "$file.original" \
|
|
||||||
--remove "$file"
|
|
||||||
done
|
done
|
||||||
# Recover GNOME backgrounds
|
# Recover GNOME backgrounds
|
||||||
file=/usr/share/gnome-background-properties/gnome-backgrounds.xml
|
file=/usr/share/gnome-background-properties/gnome-backgrounds.xml
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user