Merge pull request #1 from casperklein/patch-3

More detailed error message
This commit is contained in:
Casper 2020-07-19 21:26:36 +02:00 committed by GitHub
commit 79f6c88653
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@ escape() {
echo "${1//./\\.}"
}
[ -z "$EMAIL" ] || [ -z "$RECIPIENT" ] && { usage; errex "No email specifed"; }
[ -z "$EMAIL" ] && { usage; errex "Error: No alias specified"; }
[ -z "$RECIPIENT" ] && { usage; errex "Error: No recipient specified"; }
[ -s "$DATABASE" ] || exit 0
#CNT=$(grep "^$EMAIL" $DATABASE | wc -w | awk '{print $1}')