From 07619c7e05c3775a814b9ad9c6c305a79b117c3f Mon Sep 17 00:00:00 2001 From: "Lockszmith (@VAST)" Date: Wed, 9 Apr 2025 16:41:52 -0400 Subject: [PATCH] archive type selector for cargo-binstall added --- _src.posix/.chezmoiexternal.yaml.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_src.posix/.chezmoiexternal.yaml.tmpl b/_src.posix/.chezmoiexternal.yaml.tmpl index 02dfd3a..51092bb 100644 --- a/_src.posix/.chezmoiexternal.yaml.tmpl +++ b/_src.posix/.chezmoiexternal.yaml.tmpl @@ -76,17 +76,20 @@ "refreshPeriod" $defaultRefresh ) -}}{{- end -}}{{- end -}}{{- end -}} +{{- $archive_type := "zip" -}} +{{- if (eq .chezmoi.os "linux" ) -}} +{{- $archive_type = "tgz" -}} +{{- end -}} {{- with $app_name := "cargo-binstall" -}} {{- with $repo := (printf "%s/%s" "cargo-bins" $app_name) -}} {{- with $version := (gitHubLatestRelease $repo).GetTagName -}} -{{- with $archive_type := "zip" -}} {{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict "type" "archive-file" "url" (printf "https://github.com/%s/releases/download/%s/%s-%s.full.%s" $repo $version $app_name $myArch $archive_type) "path" $app_name "executable" true "refreshPeriod" $defaultRefresh -) -}}{{- end -}}{{- end -}}{{- end -}}{{- end -}} +) -}}{{- end -}}{{- end -}}{{- end -}} {{- if (eq .chezmoi.os "linux") -}} {{- with $app_name := "vivid" -}}