aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin/gpg-git
diff options
context:
space:
mode:
Diffstat (limited to '.local/share/bin/gpg-git')
-rwxr-xr-x.local/share/bin/gpg-git5
1 files changed, 5 insertions, 0 deletions
diff --git a/.local/share/bin/gpg-git b/.local/share/bin/gpg-git
new file mode 100755
index 0000000..281b793
--- /dev/null
+++ b/.local/share/bin/gpg-git
@@ -0,0 +1,5 @@
+#!/bin/sh
+GPG_KEY_ID="$GPG_ID_GIT" # see ~/.profile
+GPG_KEY_PASSPHRASE="$(pass "gpg/$GPG_KEY_ID.asc" | head -n1)"
+echo "gpg $*" >> ~/gpg-git.txt
+gpg --batch --no-tty --pinentry-mode loopback --passphrase "$GPG_KEY_PASSPHRASE" "$@"