.chezmoiexternal syntax improvments
- always include 'staticly defined' (aka. fast) yaml entries - default tgz/zip assignment on cargo-binstall
This commit is contained in:
parent
58c86a7e81
commit
77b49ef219
|
@ -17,10 +17,11 @@
|
||||||
# executable bool false Add executable_ attribute to file
|
# executable bool false Add executable_ attribute to file
|
||||||
# path string none Path to file in archive
|
# path string none Path to file in archive
|
||||||
*/}}
|
*/}}
|
||||||
|
{{- $defaultRefresh := "168h" -}}
|
||||||
|
|
||||||
{{- if (env "CZ_EXTR") -}}
|
{{- if (env "CZ_EXTR") -}}
|
||||||
{{/* Initialize template variables */}}
|
{{/* Initialize template variables */}}
|
||||||
{{- $myArch := "" -}}
|
{{- $myArch := "" -}}
|
||||||
{{- $defaultRefresh := "168h" -}}
|
|
||||||
{{- $externals := dict -}}
|
{{- $externals := dict -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
|
@ -76,10 +77,7 @@
|
||||||
"refreshPeriod" $defaultRefresh
|
"refreshPeriod" $defaultRefresh
|
||||||
) -}}{{- end -}}{{- end -}}{{- end -}}
|
) -}}{{- end -}}{{- end -}}{{- end -}}
|
||||||
|
|
||||||
{{- $archive_type := "zip" -}}
|
{{- $archive_type := or (get (dict "linux" "tgz") .chezmoi.os) "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 -}}
|
||||||
|
@ -268,7 +266,12 @@
|
||||||
"refreshPeriod" $defaultRefresh
|
"refreshPeriod" $defaultRefresh
|
||||||
) -}}{{- end -}}{{- end -}}{{- end }}{{- end -}}
|
) -}}{{- end -}}{{- end -}}{{- end }}{{- end -}}
|
||||||
|
|
||||||
{{- $externals | toYaml }}
|
{{- $externals | toYaml -}}
|
||||||
|
{{- else -}}
|
||||||
|
# This is a truncated version of .chezmoiexternal because CZ_EXTR env is undefined
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
".config/sz.env/lib/ble.sh.curl":
|
".config/sz.env/lib/ble.sh.curl":
|
||||||
type: "archive"
|
type: "archive"
|
||||||
url: "https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz"
|
url: "https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz"
|
||||||
|
@ -296,7 +299,3 @@
|
||||||
executable: true
|
executable: true
|
||||||
refreshPeriod: "{{ $defaultRefresh }}"
|
refreshPeriod: "{{ $defaultRefresh }}"
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- else -}}
|
|
||||||
# .chezmoiexternal is disabled because CZ_EXTR env is undefined
|
|
||||||
{{- end -}}
|
|
||||||
|
|
Loading…
Reference in New Issue