install.fairie/home/dot_local/bin/executable_gist.tmpl
Brian Zalewski 48c51c16c0 Latest
2023-03-20 02:38:30 -04:00

5 lines
290 B
Bash

#!/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