From 4fc8f3c1366e9c01ded79e978ff4da5e536d3194 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 18 Jul 2007 14:21:05 +0000 Subject: another small fixes on list creation --- firma | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'firma') diff --git a/firma b/firma index 16c6c30..0b3134e 100755 --- a/firma +++ b/firma @@ -904,6 +904,9 @@ function NewList { while true; do read -rep " List email address or 'quit' to exit: " LIST_ADDRESS if [[ "$LIST_ADDRESS" == "quit" ]]; then + echo "Deleting folder $LIST_HOMEDIR..." + rm -rf $LIST_HOMEDIR + echo "List creation aborted." exit 1 elif CheckValidEmail $LIST_ADDRESS; then break @@ -916,7 +919,10 @@ function NewList { if [[ "$return_code" == "0" ]]; then while true; do read -rep " List administrator(s) email address(es) (space delimited) or 'quit' to exit: " LIST_ADMIN - if [[ "$LIST_ADDRESS" == "quit" ]]; then + if [[ "$LIST_ADMIN" == "quit" ]]; then + echo "Deleting folder $LIST_HOMEDIR..." + rm -rf $LIST_HOMEDIR + echo "List creation aborted." exit 1 else for admin in $LIST_ADMIN; do @@ -967,6 +973,9 @@ function NewList { read -rep " Please choose a key size or 'quit' to exit: " answer answer="$(echo $answer | tr '[:lower:]' '[:upper:]')" if [[ "$answer" == "QUIT" ]]; then + echo "Deleting folder $LIST_HOMEDIR..." + rm -rf $LIST_HOMEDIR + echo "List creation aborted." exit 1 elif [[ "$answer" == "1" || "$answer" == "1024" ]]; then KEY_SIZE="1024" @@ -1001,7 +1010,10 @@ function NewList { KEY_EXPIRATION="0" break elif [[ "$KEY_EXPIRATION" == "quit" ]]; then - return_code=1 + echo "Deleting folder $LIST_HOMEDIR..." + rm -rf $LIST_HOMEDIR + echo "List creation aborted." + exit 1 elif [[ -z "$(echo $digits_only | sed -e 's/[0-9]//g')" || -n "$last_char" ]]; then break else -- cgit v1.2.3