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

6 lines
360 B
Cheetah
Raw Normal View History

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