fix two bugs in monkeysphere:check_gpg_sec_key_id that were causing gen_subkey to...
authorJameson Graef Rollins <jrollins@finestructure.net>
Sun, 1 Mar 2009 18:34:01 +0000 (13:34 -0500)
committerJameson Graef Rollins <jrollins@finestructure.net>
Sun, 1 Mar 2009 18:34:01 +0000 (13:34 -0500)
src/monkeysphere

index 6db4827c15a5ea8fc9248cf2a4c1e0f9e6cd5d79..809b1ac9f897260d95ba1f3e4c79398cc68188d9 100755 (executable)
@@ -69,7 +69,7 @@ check_gpg_sec_key_id() {
            gpgSecOut=$(gpg_user --fixed-list-mode --list-secret-keys --with-colons 2>/dev/null | egrep '^sec:')
            ;;
        1)
-           gpgSecOut=$(gpg_user --fixed-list-mode --list-secret-keys --with-colons "$keyID" | egrep '^sec:') || failure
+           gpgSecOut=$(gpg_user --fixed-list-mode --list-secret-keys --with-colons "$1" | egrep '^sec:') || failure
            ;;
        *)
            failure "You must specify only a single primary key ID."
@@ -86,9 +86,9 @@ check_gpg_sec_key_id() {
            echo "$gpgSecOut" | cut -d: -f5
            ;;
        *)
-           echo "Multiple primary secret keys found:"
-           echo "$gpgSecOut" | cut -d: -f5
-           echo "Please specify which primary key to use."
+           echo "Multiple primary secret keys found:" >&2
+           echo "$gpgSecOut" | cut -d: -f5 >&2
+           echo "Please specify which primary key to use." >&2
            failure
            ;;
     esac