]> gitweb.fluxo.info Git - firma.git/commitdiff
another small fixes on list creation
authorrhatto <rhatto>
Wed, 18 Jul 2007 14:21:05 +0000 (14:21 +0000)
committerrhatto <rhatto>
Wed, 18 Jul 2007 14:21:05 +0000 (14:21 +0000)
firma

diff --git a/firma b/firma
index 16c6c30f5597489ff10b9d5b9224450847f84b94..0b3134ecaa4bbcee74ea3bdf88668560c93ed835 100755 (executable)
--- 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