2024-04-17 19:12:20 -07:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
|
|
|
function copy-gpg-key
|
|
|
|
set -f key (\
|
|
|
|
gpg --list-secret-keys --keyid-format SHORT\
|
|
|
|
| grep 'rsa4096' \
|
|
|
|
| sed 's/sec rsa4096\///'\
|
|
|
|
| awk '{print $1}'\
|
|
|
|
)
|
|
|
|
|
2024-04-17 19:13:47 -07:00
|
|
|
copyq copy "$key" &>/dev/null && return 0
|
2024-04-17 19:12:20 -07:00
|
|
|
|
|
|
|
return 1
|
|
|
|
end
|