Started work on adding email addresses.
This commit is contained in:
parent
30f5f7aa98
commit
95f8306291
@ -12,10 +12,19 @@ muttHome="$HOME/.mutt"
|
||||
# Functions
|
||||
add_email_address()
|
||||
{
|
||||
read -p "Please enter your email address: " emailAddress
|
||||
if [ -f "$emailAddress" ]; then
|
||||
read -p "This email address alread exists, would you like to remove it? " continue
|
||||
|
||||
read -p "Please enter your email address: " emailAddress
|
||||
if ! [[ "$emailAddress" =~ .*@.*\..* ]]; then
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user