From a8c2fb1a6f39af22ccc4c5e2503f3b8a9984e554 Mon Sep 17 00:00:00 2001 From: Max Zhao Date: Sat, 25 May 2024 16:24:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`/tmp`=20=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8D=E8=83=BD=E6=AD=A3=E7=A1=AE=E6=9F=A5?= =?UTF-8?q?=E6=89=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `.*[(gz)(zip)(7z)(tar)]$` 只能匹配以字符 `g`,`z`,`i`,`p`,`t`,`a`,`r` 结尾的字符串,并不能完全匹配以`gz`,`zip`,`7z`,'tar' 结尾的字符串 --- scripts/menu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/menu.sh b/scripts/menu.sh index 851ff93..616a5dc 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -112,7 +112,7 @@ ckstatus(){ #检查执行权限 [ ! -x ${CRASHDIR}/start.sh ] && chmod +x ${CRASHDIR}/start.sh #检查/tmp内核文件 - for file in `ls -F /tmp | grep -v [/\$] | grep -v ' ' | grep -Ev ".*[(gz)(zip)(7z)(tar)]$" | grep -iE 'CrashCore|^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'` ; do + for file in `ls -F /tmp | grep -v [/\$] | grep -v ' ' | grep -Ev ".*(gz|zip|7z|tar)$" | grep -iE 'CrashCore|^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'` ; do file=/tmp/$file chmod +x $file echo -e "发现可用的内核文件: \033[36m$file\033[0m "