flocon/run_once_import_gpg_from_1password.sh.tmpl

6 lines
258 B
Bash

#!/bin/sh
{{ if findExecutable "op" (list "/usr/bin" "/usr/local/bin") }}
echo '{{ onepasswordDocument "gpg key" }}' | gpg --import
{{ else }}
echo "WARNING: 1password-cli has not been installed on your system. Your gpg key will not be imported."
{{ end }}