-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetting.sh
executable file
·52 lines (42 loc) · 1.14 KB
/
setting.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Setting the text format.
installed="\e[32minstalled\e[m"
not_found="\e[31mnot found\e[m"
# Install neovim
if type "nvim" > /dev/null 2>&1; then
echo -e "neovim is already $installed."
else
echo -e "neovim is $not_found."
echo -e "Please install neovim."
fi
# Install git
if type "git" > /dev/null 2>&1; then
echo -e "git is already $installed."
else
echo -e "git is $not_found."
echo -e "Please install git."
exit 1
fi
packer_dir="$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim"
echo -e "checking packer that is plugin manager for neovim..."
if [ ! -d $packer_dir ]; then
echo -e "packer is $not_found."
echo -e "try to install packer.nvim"
git clone --depth 1 https://github.com/wbthomason/packer.nvim $packer_dir
else
echo -e "packer is already $installed."
fi
# Install ripgrep
if type "rg" > /dev/null 2>&1; then
echo -e "ripgrep is already $installed."
else
echo -e "ripgrep is $not_found."
echo -e "Please install ripgrep."
fi
# Install nodejs
if type "node" > /dev/null 2>&1; then
echo -e "nodejs is already $installed."
else
echo -e "nodejs is $not_found."
echo -e "Please install nodejs."
fi