install.fairie/home/dot_local/bin/executable_gist.tmpl

6 lines
333 B
Cheetah
Raw Normal View History

2023-03-19 23:38:30 -07:00
#!/usr/bin/env bash
2023-08-06 22:19:59 -07:00
echo "{{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "GITHUB_GIST_TOKEN")) }}{{ includeTemplate "secrets/GITHUB_GIST_TOKEN" | decrypt | trim }}{{ else }}{{ env "GITHUB_GIST_TOKEN" }}{{ end }}" > ~/.gist
2023-03-19 23:38:30 -07:00
gist $*
rm -f ~/.gist