AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.145.97.1


Current Path : /var/lib/dpkg/info/
Upload File :
Current File : //var/lib/dpkg/info/vim-runtime.preinst

#!/bin/sh
set -e

vimcur="vim82"
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



exit 0