dotfiles/scripts/neovim.sh

35 lines
956 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2021-07-27 18:59:49 +00:00
VERSION="v0.5.0"
function install () {
cd ~
2021-11-24 14:14:39 +00:00
wget https://github.com/neovim/neovim/releases/download/${VERSION}/nvim.appimage
wget https://github.com/neovim/neovim/releases/download/${VERSION}/nvim.appimage.sha256sum
2021-07-27 18:59:49 +00:00
sha256sum nvim.appimage
sudo chmod u+x nvim.appimage
./nvim.appimage --appimage-extract
sudo mv ./squashfs-root/usr/bin/nvim /usr/bin/nvim
sudo mv ./squashfs-root/usr/lib/nvim /usr/lib/nvim
sudo mv ./squashfs-root/usr/share /usr
sudo rm nvim.appimage.sha256sum
sudo rm -rf nvim.appimage
sudo rm -rf squashfs-root
2021-07-28 05:35:47 +00:00
mkdir $HOME/.config/nvim
ln -s ${DOTFILES_PATH}/nvim/init.vim $HOME/.config/nvim/init.vim
2021-07-27 18:59:49 +00:00
}
function uninstall () {
sudo rm /usr/bin/nvim
sudo rm -rf /usr/lib/nvim
sudo rm -rf /usr/share/nvim
}
if [ "$1" == "install" ]; then
install
elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
uninstall
else
echo "please specify args with install or uninstall"
fi