diff --git a/chezmoi.roots/_src.posix/.chezmoiexternal.yaml.tmpl b/chezmoi.roots/_src.posix/.chezmoiexternal.yaml.tmpl index 4d62973..e7d2da3 100644 --- a/chezmoi.roots/_src.posix/.chezmoiexternal.yaml.tmpl +++ b/chezmoi.roots/_src.posix/.chezmoiexternal.yaml.tmpl @@ -337,6 +337,22 @@ "executable" true "refreshPeriod" $defaultRefresh ) -}}{{- end -}}{{- end -}}{{- end -}} + +{{- with $app_name := "broot" -}} +{{- with $bin_url := (output "sh" "-c" ( + list + "cargo-binstall --log-level debug --dry-run --no-track --no-confirm --json-output" + $app_name + "| jq \".fields | select ( .message == \\\"Downloading package\\\" )\"" + | join " ") | fromJson + ).url +}}{{ $_ := set $externals (printf ".local/bin/%s" $app_name) (dict + "type" "archive-file" + "url" $bin_url + "path" (printf "%s" $app_name) + "executable" true + "refreshPeriod" $defaultRefresh +) -}}{{- end -}}{{- end -}} {{- end -}} {{- $externals | toYaml -}}