install.fairie/home/dot_local/bin/executable_gist.tmpl
Brian Zalewski ec94b96b75 Latest
2023-06-19 03:32:33 +00:00

5 lines
360 B
Bash

#!/usr/bin/env bash
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
gist $*
rm -f ~/.gist