summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJamie McClelland <jm@mayfirst.org>2008-08-05 12:57:29 -0400
committerJamie McClelland <jm@mayfirst.org>2008-08-05 12:57:29 -0400
commit619616567842d79cc960a37f6212f04f80c9100b (patch)
treec06b9e90a4e084ef535e34db7db57d1d8b470282 /src
parent2221f122107dbae6a9b84cb7763625634fc1765d (diff)
adding directions to pass your key id as the first argument. Also added
extra test for people who don't pass anything as the first argument - so the help explanation is shown.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/seckey2sshagent6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/seckey2sshagent b/src/seckey2sshagent
index 2a98cf1..ecfd7aa 100755
--- a/src/seckey2sshagent
+++ b/src/seckey2sshagent
@@ -26,6 +26,10 @@ explanation() {
echo -n "The basic strategy of seckey2sshagent is to dump your
OpenPGP authentication key(s) into your agent.
+The first argument to the command should be your gpg key id (the 8
+character hex string; try gpg --list-key your@emailaddress.org to
+lookup your key id).
+
This script is a gross hack at the moment. It is done by creating a
new, temporary private keyring, letting the user remove the
passphrases from the keys, and then exporting them. The temporary
@@ -57,7 +61,7 @@ You can check on it with:
# if no hex string is supplied, just print an explanation.
# this covers seckey2sshagent --help, --usage, -h, etc...
-if [ "$(echo "$1" | tr -d '0-9a-fA-F')" ]; then
+if [ -z "$1" ] || [ "$(echo "$1" | tr -d '0-9a-fA-F')" ]; then
explanation
exit
fi