v0.12 - added nvim
This commit is contained in:
35
kfg
35
kfg
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
NAME="kfg"
|
||||
VERSION="0.11"
|
||||
VERSION="0.12"
|
||||
|
||||
HOME_PATH="$HOME"
|
||||
TMP_PATH="$HOME_PATH/.tmp/kfg_install"
|
||||
@@ -29,6 +29,7 @@ TOOLS[zoxide]="A smarter cd command. - https://github.com/ajeetdsouza/zoxide"
|
||||
TOOLS[fzf]="A command-line fuzzy finder - https://github.com/junegunn/fzf"
|
||||
TOOLS[fzf-tab]="Replace zsh's default completion selection menu with fzf - https://github.com/Aloxaf/fzf-tab"
|
||||
TOOLS[zoom]="Conference platform Zoom - https://eu01web.zoom.us/"
|
||||
TOOLS[nvim]="Neovim a modal terminal editor - https://github.com/neovim/neovim/"
|
||||
|
||||
function show_help_name {
|
||||
echo "$NAME v$VERSION"
|
||||
@@ -424,7 +425,8 @@ function init {
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
rm -R "$TMP_PATH"
|
||||
#rm -R "$TMP_PATH"
|
||||
nop
|
||||
}
|
||||
|
||||
function apt_install {
|
||||
@@ -521,6 +523,7 @@ function p_all {
|
||||
p_omp
|
||||
p_zoxide
|
||||
p_fzf
|
||||
p_nvim
|
||||
}
|
||||
|
||||
function p_zsh {
|
||||
@@ -550,6 +553,7 @@ function p_zsh {
|
||||
install_rc_download sh zsh.rc 'https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.config/sh/zsh.rc'
|
||||
}
|
||||
|
||||
|
||||
function p_tmux {
|
||||
# -----------------
|
||||
# tmux
|
||||
@@ -649,6 +653,32 @@ function p_zoom {
|
||||
install_deb "zoom_amd64.deb" "${_path_zoom}"
|
||||
}
|
||||
|
||||
function p_nvim {
|
||||
# Build nvim from source
|
||||
log_info "Installing dependencies for neovim"
|
||||
# install requirements
|
||||
apt_install ninja-build
|
||||
apt_install gettext
|
||||
apt_install cmake
|
||||
apt_install unzip
|
||||
apt_install curl
|
||||
apt_install ripgrep
|
||||
|
||||
log_info "Cloning Repository"
|
||||
# get repository
|
||||
res=$(git_clone "https://github.com/neovim/neovim" "${TMP_PATH}/neovim" 2>&1)
|
||||
res=$(git -C "${TMP_PATH}/neovim" checkout stable 2>&1)
|
||||
|
||||
# build neovim
|
||||
res=$(make -C "${TMP_PATH}/neovim" CMAKE_BUILD_TYPE=Release 2>&1)
|
||||
|
||||
# Install neovim
|
||||
log_info "Installing neovim..."
|
||||
res=$(sudo make -C "${TMP_PATH}/neovim" install 2>&1)
|
||||
log_add "Installed neovim [$(${TMP_PATH}/neovim/build/bin/nvim --version | head -n 1 | grep -oE "v(.*)$")]"
|
||||
#cd "${TMP_PATH}/neovim/build" && cpack -G DEB && sudo dpkg -i nvim-linux64.deb
|
||||
}
|
||||
|
||||
function install {
|
||||
if [ -z "$1" ]; then
|
||||
show_help_install
|
||||
@@ -682,6 +712,7 @@ function install {
|
||||
zoxide) p_zoxide; shift ;;
|
||||
fzf) p_fzf; shift ;;
|
||||
zoom) p_zoom; shift ;;
|
||||
nvim) p_nvim; shift ;;
|
||||
# If invalid options were passed, then getopt should have reported an error,
|
||||
# which we checked as VALID_ARGUMENTS when getopt was called...
|
||||
*) log_error "Unrecognised program: $1"; shift ;;
|
||||
|
||||
Reference in New Issue
Block a user