wip
This commit is contained in:
parent
1d56da5b2f
commit
3ac7e74fae
1 changed files with 10 additions and 9 deletions
19
neovim.sh
19
neovim.sh
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
PACKAGE=neovim
|
PACKAGE=neovim
|
||||||
if command_exists "$PACKAGE"; then
|
if command_exists "$PACKAGE"; then
|
||||||
echo_warning "$PACKAGE is already installed!"
|
echo "$PACKAGE is already installed!"
|
||||||
echo_warning "Exiting now!"
|
echo "Exiting now!"
|
||||||
exit 69
|
exit 69
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
getDependencies() {
|
getDependencies() {
|
||||||
echo_pkg "Checking build dependencies, and installs missing.."
|
echo_pkg deps "Checking build dependencies, and installs missing.."
|
||||||
|
|
||||||
local depsDebian=(git ninja-build gettext cmake curl build-essential)
|
local depsDebian=(git ninja-build gettext cmake curl build-essential)
|
||||||
local depsFedora=(git ninja-build cmake gcc make gettext curl glibc-gconv-extra)
|
local depsFedora=(git ninja-build cmake gcc make gettext curl glibc-gconv-extra)
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
cloneSources() {
|
cloneSources() {
|
||||||
cloneDir="$(mktemp -d)"
|
cloneDir="$(mktemp -d)"
|
||||||
echo_pkg "Cloning neovim sources into tempdir at $cloneDir/neovim"
|
echo_pkg clone "Cloning neovim sources into tempdir at $cloneDir/neovim"
|
||||||
cd $cloneDir || mkdir $cloneDir && cd $cloneDir
|
cd $cloneDir || mkdir $cloneDir && cd $cloneDir
|
||||||
|
|
||||||
if command_exists git; then
|
if command_exists git; then
|
||||||
|
@ -108,9 +108,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
makeInstall() {
|
makeInstall() {
|
||||||
echo_pkg "Compiling neovim from source"
|
echo_pkg build "Compiling neovim from source"
|
||||||
if run make CMAKE_BUILD_TYPE=RelWithDebInfo; then
|
if run make CMAKE_BUILD_TYPE=RelWithDebInfo; then
|
||||||
echo_pkg "Installing neovim.."
|
echo_pkg install "Installing neovim.."
|
||||||
run $_sudo make install
|
run $_sudo make install
|
||||||
else
|
else
|
||||||
echo_error "Failure while building!"
|
echo_error "Failure while building!"
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
|
|
||||||
checkAndInitConfig() {
|
checkAndInitConfig() {
|
||||||
if [ -d "$HOME/.config/nvim/" ]; then
|
if [ -d "$HOME/.config/nvim/" ]; then
|
||||||
echo_info "Prefetching neovim setup configuration.."
|
echo_pkg qol "Prefetching neovim setup configuration.."
|
||||||
nvim --headless +q
|
nvim --headless +q
|
||||||
else
|
else
|
||||||
echo_warning "You don't have a neovim config installed. Do you want to clone one now? [Y]es (standard), [m]inimal, [n]o"
|
echo_warning "You don't have a neovim config installed. Do you want to clone one now? [Y]es (standard), [m]inimal, [n]o"
|
||||||
|
@ -155,12 +155,13 @@
|
||||||
cloneSources
|
cloneSources
|
||||||
makeInstall
|
makeInstall
|
||||||
|
|
||||||
checkAndInitConfig
|
checkAndInitConfig </dev/tty
|
||||||
}
|
}
|
||||||
|
|
||||||
if getImports; then
|
if getImports; then
|
||||||
main
|
main </dev/tty
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo_note "Cleaning up old $cloneDir directory.."
|
echo_note "Cleaning up old $cloneDir directory.."
|
||||||
rm -rf "$cloneDir"
|
rm -rf "$cloneDir"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue