-
Notifications
You must be signed in to change notification settings - Fork 5
/
run_onchange_install-packages.sh.tmpl
56 lines (47 loc) · 1.33 KB
/
run_onchange_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
#!/bin/sh
{{ if eq .chezmoi.os "freebsd" -}}
# "FreeBSD: install minimal package set"
{{ range .packages.freebsd.minimal -}}
doas pkg install -y {{ . | quote }}
{{ end -}}
# "FreeBSD: install neovim package set"
{{ range .packages.freebsd.neovim -}}
doas pkg install -y {{ . | quote }}
{{ end -}}
{{ if eq .chezmoi.hostname "brutal" }}
# "FreeBSD: install cli package set"
{{ range .packages.freebsd.cli -}}
doas pkg install -y {{ . | quote }}
{{ end -}}
# "FreeBSD: install desktop package set"
{{ range .packages.freebsd.desktop -}}
doas pkg install -y {{ . | quote }}
{{ end -}}
{{ end -}}
{{ else if eq .chezmoi.os "darwin" -}}
brew bundle --no-lock --file=/dev/stdin <<EOF
{{ range .packages.darwin.brews -}}
brew {{ . | quote }}
{{ end -}}
{{ range .packages.darwin.casks -}}
cask {{ . | quote }}
{{ end -}}
EOF
{{ range .packages.darwin.appstore -}}
mas purchase {{ . | quote }}
mas install {{ . | quote }}
{{ end -}}
{{ else if eq .chezmoi.os "linux" -}}
{{ range .packages.linux.pkgs -}}
sudo apt --no-install-recommends install -y {{ . | quote }}
{{ end -}}
{{ range .packages.linux.snaps.standard -}}
sudo snap install {{ . | quote }}
{{ end -}}
{{ range .packages.linux.snaps.classic -}}
sudo snap install --classic {{ . | quote }}
{{ end -}}
{{ range .packages.linux.snaps.edge -}}
sudo snap install --edge {{ . | quote }}
{{ end -}}
{{ end -}}