From 0aaf087a0c9613df94a3fb69fdfc2bc6e4c120a9 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 18 Jul 2007 14:14:42 +0000 Subject: small fixes --- firma | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) (limited to 'firma') diff --git a/firma b/firma index b3e68e9..16c6c30 100755 --- a/firma +++ b/firma @@ -904,7 +904,7 @@ function NewList { while true; do read -rep " List email address or 'quit' to exit: " LIST_ADDRESS if [[ "$LIST_ADDRESS" == "quit" ]]; then - return_code=1 + exit 1 elif CheckValidEmail $LIST_ADDRESS; then break else @@ -917,7 +917,7 @@ function NewList { while true; do read -rep " List administrator(s) email address(es) (space delimited) or 'quit' to exit: " LIST_ADMIN if [[ "$LIST_ADDRESS" == "quit" ]]; then - return_code=1 + exit 1 else for admin in $LIST_ADMIN; do if ! CheckValidEmail $admin; then @@ -936,6 +936,9 @@ function NewList { # list description, passphrase and key size if [[ "$return_code" == "0" ]]; then read -rep " List description (optional): " KEY_DESCRIPTION + if [ ! -z "$KEY_DESCRIPTION" ]; then + KEY_DESCRIPTION="Name-Real: $KEY_DESCRIPTION" + fi while true; do read -rep " Automatically create a passphrase for the list pubkey? (Y/n) " answer answer="$(echo $answer | tr '[:lower:]' '[:upper:]')" @@ -960,11 +963,11 @@ function NewList { echo " Please choose a key size:" echo " 1 - 1024" echo " 2 - 2048 (default)" - echo " 2 - 4096" + echo " 3 - 4096" read -rep " Please choose a key size or 'quit' to exit: " answer answer="$(echo $answer | tr '[:lower:]' '[:upper:]')" if [[ "$answer" == "QUIT" ]]; then - return_code=1 + exit 1 elif [[ "$answer" == "1" || "$answer" == "1024" ]]; then KEY_SIZE="1024" break @@ -973,6 +976,7 @@ function NewList { break elif [[ "$answer" == "3" || "$answer" == "4096" ]]; then KEY_SIZE="4096" + break else echo " Invalid answer." fi @@ -1018,38 +1022,21 @@ function NewList { echo -e "KEY_SIZE='$KEY_SIZE'\nKEY_DESCRIPTION='$KEY_DESCRIPTION'" >> $LIST_CONFIG_FILE echo "Now generating your keyring..." - if [ -z "$KEY_DESCRIPTION" ]; then - $GPG --gen-key <