mirror of
https://github.com/mack-a/v2ray-agent.git
synced 2026-09-02 13:56:37 +00:00
fix(脚本): 修复geosite组名带引号时无法识别
This commit is contained in:
+1
-1
@@ -6901,7 +6901,7 @@ getDLCGeositeName() {
|
|||||||
escapedInput=$(escapeDLCRegexPattern "${normalizedInput}")
|
escapedInput=$(escapeDLCRegexPattern "${normalizedInput}")
|
||||||
|
|
||||||
local matchedLine=
|
local matchedLine=
|
||||||
matchedLine=$(grep -n -m1 -E "^[[:space:]]*-[[:space:]]*name:[[:space:]]*${escapedInput}[[:space:]]*$" "${dlcFilePath}")
|
matchedLine=$(grep -n -m1 -E "^[[:space:]]*-[[:space:]]*name:[[:space:]]*\"?${escapedInput}\"?[[:space:]]*$" "${dlcFilePath}")
|
||||||
if [[ -n "${matchedLine}" ]]; then
|
if [[ -n "${matchedLine}" ]]; then
|
||||||
echo "${normalizedInput}"
|
echo "${normalizedInput}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
@@ -5729,7 +5729,7 @@ getDLCGeositeName() {
|
|||||||
escapedInput=$(escapeDLCRegexPattern "${normalizedInput}")
|
escapedInput=$(escapeDLCRegexPattern "${normalizedInput}")
|
||||||
|
|
||||||
local matchedLine=
|
local matchedLine=
|
||||||
matchedLine=$(grep -n -m1 -E "^[[:space:]]*-[[:space:]]*name:[[:space:]]*${escapedInput}[[:space:]]*$" "${dlcFilePath}")
|
matchedLine=$(grep -n -m1 -E "^[[:space:]]*-[[:space:]]*name:[[:space:]]*\"?${escapedInput}\"?[[:space:]]*$" "${dlcFilePath}")
|
||||||
if [[ -n "${matchedLine}" ]]; then
|
if [[ -n "${matchedLine}" ]]; then
|
||||||
echo "${normalizedInput}"
|
echo "${normalizedInput}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user