git: d0b8158d66 - main - checkkey: Make the script work for logins starting with digits

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Wed, 13 Oct 2021 06:50:01 UTC
The branch main has been updated by 0mp:

URL: https://cgit.FreeBSD.org/doc/commit/?id=d0b8158d6634f602ca864eea102d674f83d2531c

commit d0b8158d6634f602ca864eea102d674f83d2531c
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2021-10-13 06:48:30 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2021-10-13 06:49:59 +0000

    checkkey: Make the script work for logins starting with digits
    
    Differential Revision:  https://reviews.freebsd.org/D16548
---
 documentation/tools/checkkey.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/documentation/tools/checkkey.sh b/documentation/tools/checkkey.sh
index 0806139725..deb7cbd640 100755
--- a/documentation/tools/checkkey.sh
+++ b/documentation/tools/checkkey.sh
@@ -88,10 +88,10 @@ if echo "${id}" | egrep -q '^[0-9A-F]{16}$'; then
 elif echo "${id}" | egrep -q '^[0-9A-F]{8}$'; then
 	id_type="keyid"
 	set -- "${id}" $@
-elif echo "${id}" | egrep -iq '^[a-z][-0-9a-z_]*@([-0-9a-z]+\.)[-0-9a-z]+$'; then
+elif echo "${id}" | egrep -iq '^[0-9a-z][-0-9a-z_]*@([-0-9a-z]+\.)[-0-9a-z]+$'; then
 	id_type="email"
 	email="${id}"
-elif echo "${id}" | egrep -iq '^[a-z][-0-9a-z_]*$'; then
+elif echo "${id}" | egrep -iq '^[0-9a-z][-0-9a-z_]*$'; then
 	id_type="login"
 	login="${id}"
 	email="${id}@FreeBSD.org"