-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·111 lines (97 loc) · 2.27 KB
/
install.sh
File metadata and controls
executable file
·111 lines (97 loc) · 2.27 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/bash
set -euo pipefail
arch_install() {
packages=(
git
go
make
ripgrep
fzf
fd
eza
zoxide
yq
lazygit
clang
nodejs-lts-jod
npm
ttf-hack-nerd
)
# If all the packages are installed then do nothing
if pacman -Qq "${packages[@]}" &>/dev/null; then
echo "All packages are already installed."
return
fi
sudo pacman -S "${packages[@]}"
}
macos_install() {
packages=(
act
awscli
bat
cmake
cocoapods
eza
fd
flatbuffers
font-hack-nerd-font
fzf
gh
git-delta
gnu-sed
go
lazygit
make
neovim
node
protobuf
ripgrep
shellcheck
taplo
tmux
wezterm
yq
zoxide
)
# If all the packages are installed then do nothing
if brew list "${packages[@]}" &>/dev/null; then
echo "All packages are already installed."
return
fi
brew install "${packages[@]}"
brew install --cask nikitabobko/tap/aerospace
}
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if [ -f /etc/arch-release ]; then
arch_install
else
echo "Unsupported Linux distribution. Please install the required packages manually."
exit 1
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
macos_install
else
echo "Unsupported OS. Please install the required packages manually."
exit 1
fi
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
echo "++ Installing TPM (tmux plugin manager). Remember to hit prefix+I to install plugins from tmux."
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
if ! which rustup 2>/dev/null 1>/dev/null; then
echo "++ Installing rustup"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
fi
if ! which atuin 2>/dev/null 1>/dev/null; then
echo "++ Installing atuin"
bash <(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)
fi
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "++ Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
target="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
if [ ! -d "$target" ]; then
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
fi
go install github.com/lasorda/protobuf-language-server@latest