8 lines
No EOL
484 B
Cheetah
8 lines
No EOL
484 B
Cheetah
{{- if (lookPath "go" | not) -}}
|
|
#!/bin/bash
|
|
{{- if eq .chezmoi.os "darwin" }}
|
|
brew install go
|
|
{{- else if eq .chezmoi.os "linux" }}
|
|
{{ if ne .chezmoi.uid "0" }} sudo {{ end -}}rm -rf /usr/local/go || {{ if ne .chezmoi.uid "0" }} sudo {{ end -}}mkdir -p /usr/local/go && curl -L https://go.dev/dl/$(curl "https://go.dev/VERSION?m=text" | head -n 1).linux-{{ .chezmoi.arch }}.tar.gz | {{ if ne .chezmoi.uid "0" }} sudo {{ end -}}tar -xz -C /usr/local/
|
|
{{- end }}
|
|
{{- end }} |