summaryrefslogtreecommitdiffstats
path: root/debian/vim-variant.prerm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:44:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:44:26 +0000
commit0cde7a370d07f80208bcd29597cf30d5274f38b0 (patch)
treee228a85db87eb0491d2937e213bbbab19826b682 /debian/vim-variant.prerm
parentAdding upstream version 2:8.1.0875. (diff)
downloadvim-0cde7a370d07f80208bcd29597cf30d5274f38b0.tar.xz
vim-0cde7a370d07f80208bcd29597cf30d5274f38b0.zip
Adding debian version 2:8.1.0875-5+deb10u2.debian/2%8.1.0875-5+deb10u2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/vim-variant.prerm')
-rw-r--r--debian/vim-variant.prerm43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/vim-variant.prerm b/debian/vim-variant.prerm
new file mode 100644
index 0000000..0d7fb68
--- /dev/null
+++ b/debian/vim-variant.prerm
@@ -0,0 +1,43 @@
+#!/bin/sh
+set -e
+
+pkg=@PKG@
+variant=@VARIANT@
+
+# 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
+ case "$variant" in
+ gtk|gtk3|athena) # gui enabled variants
+ remove_gui_variant_alternative
+ ;;
+ esac
+}
+
+remove_gui_variant_alternative () {
+ for i in eview evim gview gvimdiff rgview rgvim gvim; do
+ update-alternatives --remove $i /usr/bin/vim.$variant
+ done
+}
+
+case "$1" in
+ # only remove in remove/deconfigure so we don't disrupt users' preferences
+ remove|deconfigure)
+ remove_variant_alternative
+ ;;
+
+ upgrade|failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0