reimplemented send

This commit is contained in:
alterNERDtive 2022-07-19 13:56:06 +02:00
parent 9a19d1d192
commit b8ebb19ac9
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1
2 changed files with 18 additions and 9 deletions

24
gpgtool
View file

@ -186,6 +186,21 @@ closeall () {
done done
} }
# Sends keys to key servers.
send () {
zparseopts -D -E -- -keyserver=servers:
[[ -z "${servers}" ]] && server=GPGTOOLKEYSERVERS
for id in $@
do
for url in ${servers}
do
gpg --homedir "${tempdir}/gpghome" --send-keys --keyserver ${url} ${id}
done
done
}
# Prints usage information. # Prints usage information.
usage () { usage () {
echo FIXXME echo FIXXME
@ -272,12 +287,3 @@ extend () {
send ${id} send ${id}
close ${id} close ${id}
} }
# gpgtools send keyid [keyid …]
send () {
for id in $@
do
gpg --send-keys --keyserver hkps://keys.openpgp.org ${id}
gpg --send-keys --keyserver hkps://keyserver.ubuntu.com ${id}
done
}

View file

@ -7,3 +7,6 @@ GPGTOOLKEYPATH=/path/to/key/directory/
# Path to the device that holds the key directory, e.g. a USB flash drive. # Path to the device that holds the key directory, e.g. a USB flash drive.
# Can be set with `-d` `--device` # Can be set with `-d` `--device`
GPGTOOLKEYDEV=/path/to/device GPGTOOLKEYDEV=/path/to/device
# Default key severs to send keys to. Optional.
GPGTOOLKEYSERVERS=("hkps://keys.openpgp.org" "hkps://keyserver.ubuntu.com")