From c3c55ab1fc03b0e3316e610f6919b199a940f713 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Sat, 8 Jul 2023 22:17:17 +0800 Subject: [PATCH] modify neovim, update-alternatives at hooks --- neovim-bin/DEBBUILD | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/neovim-bin/DEBBUILD b/neovim-bin/DEBBUILD index 92c31bd..c6bea28 100644 --- a/neovim-bin/DEBBUILD +++ b/neovim-bin/DEBBUILD @@ -2,7 +2,7 @@ pkgname="neovim" pkgver="0.9.0" -pkgrel=4 +pkgrel=5 pkgcommit="" pkgdesc="A modern editor" url="https://github.com/neovim/neovim" @@ -18,3 +18,15 @@ function package { mv "${srcdir}/nvim-linux64/lib" "${pkgdir}/usr/lib" mv "${srcdir}/nvim-linux64/share" "${pkgdir}/usr/share" } + +function debian_postinst { +cat << EOF +update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 80 +EOF +} + +function debian_prerm { +cat << EOF +update-alternatives --remove editor /usr/bin/nvim +EOF +}