summaryrefslogtreecommitdiffstats
path: root/debian/vim-gtk.preinst
blob: 8ac7bc2fdfb760d1c20c99f124db000f8080f964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -e

variant=gtk

# remove /usr/bin/vim.variant as alternative for /usr/bin/vim

remove_variant_alternative () {
  for i in vi view ex editor rvim rview vimdiff vim; do
    update-alternatives --remove $i /usr/bin/vim.$variant
  done
  remove_gui_variant_alternative
}

remove_gui_variant_alternative () {
  for i in eview evim gview gvimdiff rgview rgvim gvim; do
    update-alternatives --remove $i /usr/bin/vim.$variant
  done
}

if [ "$1" = "upgrade" ]; then
  remove_variant_alternative
fi

#DEBHELPER#

exit 0