Kaynağa Gözat

Resolve code review comments

Kevin Cui 5 yıl önce
ebeveyn
işleme
4957d3d423
1 değiştirilmiş dosya ile 3 ekleme ve 4 silme
  1. 3 4
      tmpmail

+ 3 - 4
tmpmail

@@ -107,14 +107,13 @@ generate_email_address() {
 
         # Do a regex check to see if the email address provided by the user is a
         # valid email address
-        regexp="[a-z]+@1secmail\.(com|net|org)"
-        printf "%b" "$EMAIL_ADDRESS" | grep -E "$regexp" >/dev/null
+        REGEXP="[a-z]+@1secmail\.(com|net|org)"
+        printf "%b" "$EMAIL_ADDRESS" | grep -E "$REGEXP" >/dev/null
 
         # Get the exit status of the command above
         STATUS=$?
 
-        [ "$STATUS" -ne 0 ] \
-            && print_error "Provided email is invalid. Must match $regexp"
+        [ "$STATUS" -ne 0 ] && print_error "Provided email is invalid. Must match $REGEXP"
     fi
 
     # Save the generated email address to the $TMPMAIL_EMAIL_ADDRESS file