dotfiles/.chezmoiscripts/run_install_pfetch.sh.tmpl

14 lines
No EOL
758 B
Cheetah

{{- if (lookPath "macchina" | not) -}}
#!/bin/bash
{{- if eq .chezmoi.os "darwin" }}
brew install macchina
{{- else if eq .chezmoi.os "linux" }}
{{- if eq .chezmoi.arch "amd64" }}
{{ if ne .chezmoi.uid "0" }} sudo {{ end -}}curl -LO /usr/local/bin/macchina https://github.com/Macchina-CLI/macchina/releases/download/v{{ (gitHubLatestRelease "Macchina-CLI/macchina").TagName }}/macchina-linux-x86_64
{{- else if .chezmoi.arch "arm64" }}
{{ if ne .chezmoi.uid "0" }} sudo {{ end -}}curl -LO /usr/local/bin/macchina https://github.com/Macchina-CLI/macchina/releases/download/v{{ (gitHubLatestRelease "Macchina-CLI/macchina").TagName }}/macchina-linux-aarch64
{{- end }}
chmod +x /usr/local/bin/macchina
{{- end }}
{{- end }}