-
Notifications
You must be signed in to change notification settings - Fork 1
/
installer.sh
executable file
·88 lines (75 loc) · 1.29 KB
/
installer.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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/zsh
trap "exit" INT
function check_req {
command -v "$@" >/dev/null 2>&1
}
typeset -a needed_req=(
curl
git
go
nodejs-lts-iron
npm
python-pip
rustup
yarn
zsh
)
typeset -a shell_req=(
bat
dust
eza
fd
git-delta
hyperfine
jq
kitty
lazydocker-bin
lazygit
nawk
otf-cascadia-code
python-pip
ripgrep
ttf-nerd-fonts-symbols
xclip
zathura
zathura-pdf-mupdf
)
typeset -a nvim_req=(
bat
bibclean
fd
fswatch
lua51
luarocks
neovim
python-pynvim
ripgrep
tree-sitter
tree-sitter-cli
xclip
xdotool
)
# needed stuff
if ! check_req zsh paru; then
echo "Make sure you have zsh and paru installed!"
return 1
fi
# change to zsh default shell
if [[ ! $SHELL =~ zsh$ ]]; then
echo "Changing default shell"
chsh -s /bin/zsh
fi
# setup paru and upgrade all packages
paru --gendb
paru -Syyuu
# important stuff
paru -S --noconfirm --needed "${needed_req[@]}"
# shell requirements
paru -S --noconfirm --needed "${shell_req[@]}"
# neovim requirements
paru -S --noconfirm --needed "${nvim_req[@]}"
yarn global add neovim
# install ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc
echo "Installation completed!"
echo "You may want to reboot your computer!"