You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
608 B
31 lines
608 B
#!/bin/bash |
|
|
|
function delete_this_key() { |
|
echo "# DELETE [$GROUP]$KEY" |
|
} |
|
|
|
while read; do |
|
# Currently unused |
|
if [ "${REPLY#\[}" != "$REPLY" ] ; then # group name |
|
GROUP="${REPLY:1:${#REPLY}-2}" |
|
continue; |
|
fi |
|
# normal key=value pair: |
|
KEY="${REPLY%%=*}" |
|
VALUE="${REPLY#*=}" |
|
|
|
case "$GROUP" in |
|
Identity*) |
|
echo "# got Identity Key \"$KEY\"" |
|
case "$KEY" in |
|
"Default PGP Key") |
|
echo "[$GROUP]" |
|
echo "PGP Signing Key=$VALUE" |
|
echo "[$GROUP]" |
|
echo "PGP Encryption Key=$VALUE" |
|
delete_this_key |
|
;; |
|
esac |
|
;; |
|
esac |
|
done
|
|
|