reimplemented send
This commit is contained in:
parent
9a19d1d192
commit
b8ebb19ac9
2 changed files with 18 additions and 9 deletions
24
gpgtool
24
gpgtool
|
@ -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
|
|
||||||
}
|
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue