Started work on adding email addresses.
This commit is contained in:
parent
30f5f7aa98
commit
95f8306291
@ -13,9 +13,18 @@ muttHome="$HOME/.mutt"
|
|||||||
add_email_address()
|
add_email_address()
|
||||||
{
|
{
|
||||||
read -p "Please enter your email address: " emailAddress
|
read -p "Please enter your email address: " emailAddress
|
||||||
if [ -f "$emailAddress" ]; then
|
if ! [[ "$emailAddress" =~ .*@.*\..* ]]; then
|
||||||
read -p "This email address alread exists, would you like to remove it? " continue
|
read -p "this appears to be an invalid email address. Continue anyway? " continue
|
||||||
|
if [ "${continue^}" != "Y" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -f "$muttHome/$emailAddress" ]; then
|
||||||
|
read -p "This email address already exists. Overwrite the existing settings? " continue
|
||||||
|
if [ "${continue^}" != "Y" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is the main loop of the program
|
# This is the main loop of the program
|
||||||
|
Loading…
x
Reference in New Issue
Block a user