archive type selector for cargo-binstall added

This commit is contained in:
Lockszmith (@VAST) 2025-04-09 16:41:52 -04:00
parent abf0bfb808
commit 07619c7e05
1 changed files with 5 additions and 2 deletions

View File

@ -76,17 +76,20 @@
"refreshPeriod" $defaultRefresh "refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}} ) -}}{{- end -}}{{- end -}}{{- end -}}
{{- $archive_type := "zip" -}}
{{- if (eq .chezmoi.os "linux" ) -}}
{{- $archive_type = "tgz" -}}
{{- end -}}
{{- with $app_name := "cargo-binstall" -}} {{- with $app_name := "cargo-binstall" -}}
{{- with $repo := (printf "%s/%s" "cargo-bins" $app_name) -}} {{- with $repo := (printf "%s/%s" "cargo-bins" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} {{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- with $archive_type := "zip" -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict {{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file" "type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.full.%s" $repo $version $app_name $myArch $archive_type) "url" (printf "https://github.com/%s/releases/download/%s/%s-%s.full.%s" $repo $version $app_name $myArch $archive_type)
"path" $app_name "path" $app_name
"executable" true "executable" true
"refreshPeriod" $defaultRefresh "refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}{{- end -}} ) -}}{{- end -}}{{- end -}}{{- end -}}
{{- if (eq .chezmoi.os "linux") -}} {{- if (eq .chezmoi.os "linux") -}}
{{- with $app_name := "vivid" -}} {{- with $app_name := "vivid" -}}