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

6 lines
290 B
Cheetah
Raw Normal View History

2023-03-20 06:38:30 +00:00
#!/usr/bin/env bash
echo "{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NPM_TOKEN")) }}{{ includeTemplate "secrets/NPM_TOKEN" | decrypt }}{{ else if (env "NPM_TOKEN") }}{{ env "NPM_TOKEN" }}{{ else }}${GITHUB_GIST_TOKEN}{{ end }}" > ~/.gist
gist $*
rm -f ~/.gist