install.fairie/home/dot_local/bin/private_executable_gist.tmpl
2024-01-03 01:40:12 +00:00

5 lines
333 B
Bash

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