-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev_setup.sh
More file actions
executable file
·75 lines (63 loc) · 2.26 KB
/
Copy pathdev_setup.sh
File metadata and controls
executable file
·75 lines (63 loc) · 2.26 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/bash
# check if a root user
user=`whoami`
packages=(git curl zsh)
if [ $user == "root" ]; then
apt-get update
for package in "${packages[@]}"; do
hold=`dpkg -s $package`
if [ -z $hold ]; then
apt-get install $package -y
fi
done
# install neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage --appimage-extract
mv squashfs-root /
# check if nvim folder exist
var=`find /usr/bin -name nvim`
if [ "$var" ]; then
rm -rf "$var"
fi
ln -s /squashfs-root/AppRun /usr/bin/nvim
# install nvchad
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1
# install syntax plugins and autosuggestion
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
# search and replace
sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc
source ~/.zshrc
# install Ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
else
sudo apt-get update
for package in "${packages[@]}"; do
hold=`dpkg -s $package`
if [ -z $hold ]; then
sudo apt-get install $package -y
fi
done
# install neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage --appimage-extract
sudo mv squashfs-root /
# check if nvim folder exist
var=`find /usr/bin -name nvim`
if [ "$var" ]; then
sudo rm -rf "$var"
fi
sudo ln -s /squashfs-root/AppRun /usr/bin/nvim
# install nvchad
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1
# install syntax plugins and autosuggestion
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
# search and replace
sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc
source ~/.zshrc
# install Ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi