commit 1be551666b71bd174f780f1e20b0aa8dc99c24a5 parent 8d6da3f86221b3191e7ed34ccd2c660390d09e62 Author: hhvn <dev@hhvn.uk> Date: Sun, 13 Jun 2021 11:16:00 +0100 .s/b/passgpg .s/b/passgpg2: use file Diffstat:
M | .scripts/bin/passgpg | | | 7 | ++++++- |
M | .scripts/bin/passgpg2 | | | 7 | ++++++- |
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.scripts/bin/passgpg b/.scripts/bin/passgpg @@ -1,3 +1,8 @@ #!/bin/sh -gpg --armour --passphrase "$(dpass gpg3key)" "$@" +file=/tmp/$$.passwd +touch $file +chmod 0600 $file +dpass gpg3key > $file +gpg --armour --passphrase-file $file "$@" +rm $file diff --git a/.scripts/bin/passgpg2 b/.scripts/bin/passgpg2 @@ -2,4 +2,9 @@ # gpg2 is so stupid, use gpg1 if you have the chance # why do I need --batch and --pinentry-mode loopback just so --passphrase works? wtf? -gpg2 --armour --batch --pinentry-mode loopback --passphrase "$(dpass gpg3key)" "$@" +file=/tmp/$$.passwd +touch $file +chmod 0600 $file +dpass gpg3key > $file +gpg2 --armour --batch --pinentry-mode loopback --passphrase-file $file "$@" +rm $file