mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
Add nvim version check berfore installing (#586)
* Added nvim version check * Moved the check to a func Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com> --------- Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
parent
e82fd82850
commit
2ab6c1670b
|
@ -4,6 +4,15 @@
|
||||||
|
|
||||||
gitpath="$HOME/.local/share/neovim"
|
gitpath="$HOME/.local/share/neovim"
|
||||||
|
|
||||||
|
checkNeovimVer() {
|
||||||
|
# lazy.nvim requires nvim >= 0.8.0
|
||||||
|
nvim_version=$(nvim --version | head -n 1 | awk '{print $2}')
|
||||||
|
if [ "$(printf "%s\n" "$nvim_version" "0.8.0" | sort -V | head -n 1)" != "0.8.0" ]; then
|
||||||
|
printf "%b\n" "${RED}Neovim version $nvim_version not supported.${RC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
cloneNeovim() {
|
cloneNeovim() {
|
||||||
# Check if the dir exists before attempting to clone into it.
|
# Check if the dir exists before attempting to clone into it.
|
||||||
if [ -d "$gitpath" ]; then
|
if [ -d "$gitpath" ]; then
|
||||||
|
@ -54,6 +63,7 @@ linkNeovimConfig() {
|
||||||
checkEnv
|
checkEnv
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
installNeovim
|
installNeovim
|
||||||
|
checkNeovimVer
|
||||||
cloneNeovim
|
cloneNeovim
|
||||||
backupNeovimConfig
|
backupNeovimConfig
|
||||||
linkNeovimConfig
|
linkNeovimConfig
|
||||||
|
|
Loading…
Reference in New Issue
Block a user