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.preinst.in | |
parent | Adding upstream version 2:8.2.2434. (diff) | |
download | vim-debian.tar.xz vim-debian.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 '')
-rw-r--r-- | debian/vim-runtime.preinst.in | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/vim-runtime.preinst.in b/debian/vim-runtime.preinst.in new file mode 100644 index 0000000..9e5df5f --- /dev/null +++ b/debian/vim-runtime.preinst.in @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +vimcur="@VIMCUR@" +basedir=/usr/share/vim/$vimcur/doc + +add_diversion() { + dpkg-divert --package vim-runtime --add --rename \ + --divert "$1.vim-tiny" "$1" +} + +major_upgrade() { + oldver="${1#?:}" + oldver="vim$(echo ${oldver%.*-*} | sed 's/\.//g')" + [ "$oldver" != "$vimcur" ] +} + +# Add diversions for any non-upgrade operation or when upgrading across major +# upstream versions. +if [ "$1" != "upgrade" ] || major_upgrade $2; then + add_diversion $basedir/help.txt + add_diversion $basedir/tags +fi + +#DEBHELPER# + +exit 0 |