diff --git a/_src.posix/.chezmoiexternal.yaml.tmpl b/_src.posix/.chezmoiexternal.yaml.tmpl index 87cd982..d7f809e 100644 --- a/_src.posix/.chezmoiexternal.yaml.tmpl +++ b/_src.posix/.chezmoiexternal.yaml.tmpl @@ -99,6 +99,8 @@ "refreshPeriod" $defaultRefresh ) -}}{{- end -}}{{- end -}}{{- end -}} +{{- if lookPath "jq" -}} +{{- $path_prefix := or (get (dict "linux" "./") .chezmoi.os) "" -}} {{- with $app_name := "eza" -}} {{- with $bin_url := (output "sh" "-c" ( list @@ -112,7 +114,7 @@ {{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict "type" "archive-file" "url" $bin_url - "path" $app_name + "path" (printf "%s%s" $path_prefix $app_name) "executable" true "refreshPeriod" $defaultRefresh ) -}}{{- end -}}{{- end -}}{{- end -}} @@ -134,6 +136,7 @@ "executable" true "refreshPeriod" $defaultRefresh ) -}}{{- end -}}{{- end -}}{{- end -}} +{{- end -}} {{/* # valid arch strings: @@ -148,6 +151,17 @@ */}} {{- $myArch = (printf "%s_%s" .chezmoi.os .chezmoi.arch) -}} +{{- with $app_name := "gojq" -}} +{{- with $repo := (printf "%s/%s" "itchyny" $app_name) -}} +{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} +{{- $_ := set $externals (printf ".local/bin/%s" "jq") (dict + "type" "archive-file" + "url" (printf "https://github.com/%s/releases/download/%s/%s_%s_%s.tar.gz" $repo $version $app_name $version $myArch) + "path" (printf "%s_%s_%s/%s" $app_name $version $myArch $app_name) + "executable" true + "refreshPeriod" $defaultRefresh +) -}}{{- end -}}{{- end -}}{{- end -}} + {{- with $app_name := "git-credential-oauth" -}} {{- with $repo := (printf "%s/%s" "hickford" $app_name) -}} {{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}} @@ -219,6 +233,17 @@ "refreshPeriod" $defaultRefresh ) -}}{{- end -}}{{- end -}}{{- end -}} +{{- with $app_name := "fastfetch" -}} +{{- with $repo := (printf "%s/%s" "fastfetch-cli" $app_name) -}} +{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} +{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict + "type" "archive-file" + "url" (printf "https://github.com/%s/releases/download/%s/%s-%s.tar.gz" $repo $version $app_name $myArch) + "executable" true + "path" (printf "%s-%s/usr/bin/%s" $app_name $myArch $app_name) + "refreshPeriod" $defaultRefresh +) -}}{{- end -}}{{- end -}}{{- end -}} + {{- if (not (eq .chezmoi.os "darwin")) -}} {{- with $app_name := "moar" -}} {{- with $repo := (printf "%s/%s" "walles" $app_name) -}} @@ -320,4 +345,3 @@ executable: true refreshPeriod: "{{ $defaultRefresh }}" {{- end -}} -