-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·18 lines (15 loc) · 922 Bytes
/
install
File metadata and controls
executable file
·18 lines (15 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
command -v nvim &>/dev/null || { echo "Neovim ('nvim') doesn't seem to be installed" >&2 && exit 1; }
command -v pip3 &>/dev/null || { echo "Python 'pip3' command doesn't seem to be installed" >&2 && exit 1; }
pip3 freeze | grep -E '^pynvim=' &>/dev/null || { echo "python 'pynvim' package doesn't seem to be installed" >&2 && exit 1; }
if ! command -v fd &>/dev/null; then
if command -v fdfind &>/dev/null && command -v update-alternatives &>/dev/null; then
echo "Creating 'fd' alternative for fdfind..."
sudo update-alternatives --install /usr/bin/fd fd /usr/bin/fdfind 1
else
echo "fdfind ('fd') doesn't seem to be installed" >&2
exit 1
fi
fi
NVIM_VERSION=($(nvim --version | head -n1 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | awk -F. '{print $1 " " $2 " " $3}'))
[ "${NVIM_VERSION[1]}" -lt 8 ] && echo "nvim >= 0.9.0 is required for this configuration" && exit 1