-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_onchange_before_install-packages.sh.tmpl
165 lines (157 loc) · 3.75 KB
/
run_onchange_before_install-packages.sh.tmpl
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!/bin/bash
set -e
BRIGHT_CYAN=$(tput setaf 14)
BRIGHT_WHITE=$(tput setaf 15)
BG_BLUE=$(tput setab 4)
BOLD=$(tput bold)
RESET=$(tput op)
WARN="$BOLD$BRIGHT_WHITE$BG_BLUE"
PROMPT="$BOLD$BRIGHT_CYAN"
{{ if eq .osIdLike "linux-debian" -}}
echo "${WARN}Both apt and snap require sudo: expect asking for the sudo password.${RESET}"
echo "${PROMPT}Installing command line apps: sudo apt install...${RESET}"
sudo apt install -y build-essential bash-completion micro wget age mosh dialog \
bat ncdu jq tmux silversearcher-ag tig httpie prettyping htop parallel \
brotli gh hub mc ripgrep duf hyperfine zoxide nginx shellcheck clangd \
grc golang gopls rustc python3 python3-pylsp net-tools firejail waypipe lnav
{{ if .hasGui -}}
echo "${PROMPT}Installing GUI apps: sudo apt install...${RESET}"
sudo apt install -y meld alacritty flatpak gnome-software-plugin-flatpak ttf-mscorefonts-installer firetools
{{- end }}
# sudo snap install bottom
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "${PROMPT}Installing brew packages...${RESET}"
brew bundle --no-lock --file=/dev/stdin <<EOF
tap "homebrew/bundle"
tap "joerdav/xc"
brew "aws-iam-authenticator"
brew "awscli"
brew "bash-git-prompt"
brew "bottom"
brew "broot"
brew "cheat"
brew "deno"
brew "diff-so-fancy"
brew "dust"
brew "eza"
brew "fastfetch"
brew "fd"
brew "fzf"
brew "git-lfs"
brew "gping"
brew "helix"
brew "helm"
brew "kubernetes-cli"
brew "lazygit"
brew "lua"
brew "lua-language-server"
brew "nvm"
brew "prettier"
brew "pyenv"
brew "rust-analyzer"
brew "tealdeer"
brew "typescript-language-server"
brew "wabt"
brew "whalebrew"
brew "xc"
brew "xh"
brew "zig"
brew "zls"
EOF
brew completions link
{{ if .hasGui -}}flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo{{- end }}
{{- else if eq .osIdLike "darwin" -}}
if [ -f /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -f /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
echo "${PROMPT}Installing brew packages...${RESET}"
brew bundle --no-lock --file=/dev/stdin <<EOF
tap "homebrew/bundle"
tap "joerdav/xc"
brew "aws-iam-authenticator"
brew "awscli"
brew "bash-completion"
brew "bash-git-prompt"
brew "bat"
brew "bottom"
brew "broot"
brew "brotli"
brew "cheat"
brew "deno"
brew "dialog"
brew "diff-so-fancy"
brew "duf"
brew "dust"
brew "eza"
brew "fastfetch"
brew "fd"
brew "fzf"
brew "gh"
brew "git"
{{ if .hasGui -}}brew "git-gui"{{- end }}
brew "git-lfs"
brew "go"
brew "gopls"
brew "gping"
brew "grc"
brew "helix"
brew "helm"
brew "htop"
brew "httpie"
brew "hub"
brew "hyperfine"
brew "jq"
brew "kubernetes-cli"
brew "lazygit"
brew "lnav"
brew "lua"
brew "lua-language-server"
brew "micro"
brew "midnight-commander"
brew "mosh"
brew "ncdu"
brew "nginx"
brew "nvm"
brew "parallel"
brew "prettier"
brew "prettyping"
brew "pyenv"
brew "python@3"
brew "ripgrep"
brew "rust"
brew "rust-analyzer"
brew "shellcheck"
brew "tealdeer"
brew "the_silver_searcher"
brew "tig"
brew "tmux"
brew "typescript-language-server"
brew "wabt"
brew "wget"
brew "whalebrew"
brew "xc"
brew "xh"
brew "zig"
brew "zls"
brew "zoxide"
{{ if .hasGui -}}cask "alacritty"{{- end }}
{{ if .hasGui -}}cask "font-fira-code-nerd-font"{{- end }}
{{ if .hasGui -}}cask "font-hack-nerd-font"{{- end }}
{{ if .hasGui -}}cask "meld"{{- end }}
EOF
{{- end }}
if command -v tmux &> /dev/null; then
if [ ! -f "$HOME/.config/tmux/plugins/tpm/tpm" ]; then
echo "${PROMPT}Installing tmux plugin manager...${RESET}"
git clone https://github.com/tmux-plugins/tpm "$HOME/.config/tmux/plugins/tpm"
fi
fi
echo "${PROMPT}Installing the latest stable Node...${RESET}"
. "$(brew --prefix nvm)/nvm.sh"
nvm install stable
if ! command -v bun &> /dev/null; then
echo "${PROMPT}Installing Bun...${RESET}"
curl -fsSL https://bun.sh/install | bash
fi