diff options
author | rhatto <rhatto> | 2007-07-18 14:21:05 +0000 |
---|---|---|
committer | rhatto <rhatto> | 2007-07-18 14:21:05 +0000 |
commit | 4fc8f3c1366e9c01ded79e978ff4da5e536d3194 (patch) | |
tree | a3150626c2b25e58318bea2a2372a7b2650f3fa2 | |
parent | 0aaf087a0c9613df94a3fb69fdfc2bc6e4c120a9 (diff) | |
download | firma-4fc8f3c1366e9c01ded79e978ff4da5e536d3194.tar.gz firma-4fc8f3c1366e9c01ded79e978ff4da5e536d3194.tar.bz2 |
another small fixes on list creation
-rwxr-xr-x | firma | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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 |