mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 16:01:28 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -629,8 +629,8 @@ EOF
|
|||||||
cat "$TMPDIR"/rules.yaml >>"$TMPDIR"/rules.add
|
cat "$TMPDIR"/rules.yaml >>"$TMPDIR"/rules.add
|
||||||
mv -f "$TMPDIR"/rules.add "$TMPDIR"/rules.yaml
|
mv -f "$TMPDIR"/rules.add "$TMPDIR"/rules.yaml
|
||||||
}
|
}
|
||||||
#mix模式生成rule-providers
|
#mix和route模式生成rule-providers
|
||||||
[ "$dns_mod" = "mix" ] && ! grep -q 'cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q '^rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && {
|
[ "$dns_mod" = "mix" ] || [ "$dns_mod" = "route" ] && ! grep -q 'cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q '^rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && {
|
||||||
space=$(sed -n "1p" "$TMPDIR"/rule-providers.yaml | grep -oE '^ *') #获取空格数
|
space=$(sed -n "1p" "$TMPDIR"/rule-providers.yaml | grep -oE '^ *') #获取空格数
|
||||||
[ -z "$space" ] && space=' '
|
[ -z "$space" ] && space=' '
|
||||||
echo "${space}cn: {type: http, behavior: domain, format: mrs, path: ./ruleset/cn.mrs, url: https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@update/bin/geodata/mrs_geosite_cn.mrs}" >>"$TMPDIR"/rule-providers.yaml
|
echo "${space}cn: {type: http, behavior: domain, format: mrs, path: ./ruleset/cn.mrs, url: https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@update/bin/geodata/mrs_geosite_cn.mrs}" >>"$TMPDIR"/rule-providers.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user