summaryrefslogtreecommitdiffstats
path: root/debian/vim-gtk.preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/vim-gtk.preinst')
-rw-r--r--debian/vim-gtk.preinst27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/vim-gtk.preinst b/debian/vim-gtk.preinst
new file mode 100644
index 0000000..8ac7bc2
--- /dev/null
+++ b/debian/vim-gtk.preinst
@@ -0,0 +1,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