mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-09 22:32:45 +00:00
Use grep basic rather than extended regular expressions
This commit is contained in:
parent
3f31a4870f
commit
d31c096140
8
acme.sh
8
acme.sh
@ -50,8 +50,8 @@ NGINX="nginx:"
|
|||||||
NGINX_START="#ACME_NGINX_START"
|
NGINX_START="#ACME_NGINX_START"
|
||||||
NGINX_END="#ACME_NGINX_END"
|
NGINX_END="#ACME_NGINX_END"
|
||||||
|
|
||||||
BEGIN_CSR="-----BEGIN( NEW)? CERTIFICATE REQUEST-----"
|
BEGIN_CSR="-----BEGIN\( NEW\)\? CERTIFICATE REQUEST-----"
|
||||||
END_CSR="-----END( NEW)? CERTIFICATE REQUEST-----"
|
END_CSR="-----END\( NEW\)\? CERTIFICATE REQUEST-----"
|
||||||
|
|
||||||
BEGIN_CERT="-----BEGIN CERTIFICATE-----"
|
BEGIN_CERT="-----BEGIN CERTIFICATE-----"
|
||||||
END_CERT="-----END CERTIFICATE-----"
|
END_CERT="-----END CERTIFICATE-----"
|
||||||
@ -798,7 +798,7 @@ _getfile() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
i="$(grep -n -E -- "$startline" "$filename" | cut -d : -f 1)"
|
i="$(grep -n -- "$startline" "$filename" | cut -d : -f 1)"
|
||||||
if [ -z "$i" ]; then
|
if [ -z "$i" ]; then
|
||||||
_err "Can not find start line: $startline"
|
_err "Can not find start line: $startline"
|
||||||
return 1
|
return 1
|
||||||
@ -806,7 +806,7 @@ _getfile() {
|
|||||||
i="$(_math "$i" + 1)"
|
i="$(_math "$i" + 1)"
|
||||||
_debug i "$i"
|
_debug i "$i"
|
||||||
|
|
||||||
j="$(grep -n -E -- "$endline" "$filename" | cut -d : -f 1)"
|
j="$(grep -n -- "$endline" "$filename" | cut -d : -f 1)"
|
||||||
if [ -z "$j" ]; then
|
if [ -z "$j" ]; then
|
||||||
_err "Can not find end line: $endline"
|
_err "Can not find end line: $endline"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user