dotfiles/.chezmoiscripts/run_install_dotnet.sh.tmpl

10 lines
543 B
Cheetah
Raw Normal View History

2023-10-10 20:22:26 +00:00
{{- if (lookPath "dotnet" | not) -}}
#!/bin/bash
{{- if eq .chezmoi.os "darwin" }}
brew tap isen-ng/dotnet-sdk-versions
brew install --cask dotnet-sdk7-0-400 dotnet-sdk6-0-400
{{- else if eq .chezmoi.os "linux" }}
curl -L https://dot.net/v1/dotnet-install.sh | {{ if ne .chezmoi.uid "0" }} sudo {{ end -}}bash -s -- --channel LTS --install-dir /usr/local/dotnet
curl -L https://dot.net/v1/dotnet-install.sh | {{ if ne .chezmoi.uid "0" }} sudo {{ end -}}bash -s -- --channel STS --install-dir /usr/local/dotnet
{{- end }}
{{- end }}