Migrate gpg wrapper from using gpg2 to just gpg, because GnuPG 2.1.23 removes the 'gpg2' alias

This commit is contained in:
Danielle McLean 2017-08-10 11:13:58 +10:00
parent 7f211abcf8
commit adf91732a8
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
2 changed files with 2 additions and 2 deletions

13
local/bin/gpg-for-git-signing Executable file
View file

@ -0,0 +1,13 @@
#!/bin/zsh
# There's a weird inconsistency between the --default-key and --local-user
# arguments: when you have multiple signing subkeys, --local-user chooses the
# newest, and --default-key chooses the one that's available. The latter is
# clearly preferable. So we shuffle the arguments around a little.
for arg; do
if [[ $arg = -bsau ]]; then
args+=(-bsa --default-key)
else
args+=($arg)
fi
done
exec gpg --no-tty "${(@)args}"