diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 13:18:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 13:18:04 +0000 |
commit | 519cbf08704063b930fa613235d4a598105a449a (patch) | |
tree | 426a5a2a33b5ea123678481edd7d59dcf7ff58e9 /debian/vim-runtime.postrm.in | |
parent | Adding upstream version 2:8.2.2434. (diff) | |
download | vim-519cbf08704063b930fa613235d4a598105a449a.tar.xz vim-519cbf08704063b930fa613235d4a598105a449a.zip |
Adding debian version 2:8.2.2434-3+deb11u1.debian/2%8.2.2434-3+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/vim-runtime.postrm.in')
-rw-r--r-- | debian/vim-runtime.postrm.in | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/vim-runtime.postrm.in b/debian/vim-runtime.postrm.in new file mode 100644 index 0000000..6536648 --- /dev/null +++ b/debian/vim-runtime.postrm.in @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +vimcur="@VIMCUR@" +basedir=/usr/share/vim/$vimcur/doc + +rm_diversion() { + dpkg-divert --package vim-runtime --rename --remove "$1" +} + +# When upgrading to a new major upstream release, we need to remove the old +# vim-tiny help(tags) diversions +major_upgrade() { + newver="${1#?:}" + newver="vim$(echo ${newver%.*-*} | sed 's/\.//g')" + [ "$newver" != "$vimcur" ] +} + +rm -f /usr/share/vim/addons/doc/tags +if [ "$1" = "remove" -o "$1" = "abort-install" -o "$1" = "disappear" ] \ + || ([ "$1" = "upgrade" ] && major_upgrade $2); then + rm_diversion $basedir/help.txt + rm_diversion $basedir/tags +fi + +#DEBHELPER# + +exit 0 |