mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
适配 meta 内核的两行版本信息
This commit is contained in:
parent
f24e796dcc
commit
d6eb83ac30
|
@ -55,7 +55,7 @@ jobs:
|
|||
./tmp/*
|
||||
- name: Commit and push version
|
||||
run: |
|
||||
sed -i "s/meta.a_v=.*/meta.a_v=${download_version}/" bin/version
|
||||
sed -i "s/meta.a_v=.*/meta.a_v=$(./tmp/clash-linux-amd64 -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')/" bin/version
|
||||
rm -fr ./tmp
|
||||
git config --global user.email "juewuy@126.com" && git config --global user.name "Bot"
|
||||
git add . && git commit -m "更新Meta.Alpha内核至${download_version}" || exit 0
|
||||
|
|
2
.github/workflows/update_meta_core.yaml
vendored
2
.github/workflows/update_meta_core.yaml
vendored
|
@ -50,7 +50,7 @@ jobs:
|
|||
rm -fr ./bin/clash.meta/*
|
||||
cp ./tmp/* ./bin/clash.meta/
|
||||
rm -fr ./tmp
|
||||
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
|
||||
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')/" bin/version
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
|
||||
|
|
|
@ -843,7 +843,7 @@ update(){
|
|||
[ "$clashcore" = "clashpre" ] && clash_n=$clashpre_v
|
||||
[ "$clashcore" = "clash.net" ] && clash_n=$clashnet_v
|
||||
[ "$clashcore" = "clash.meta" ] && clash_n=$meta_v
|
||||
clash_v=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
|
||||
clash_v=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
|
||||
[ -z "$clash_v" ] && clash_v=$clashv
|
||||
echo -e "\033[30;47m欢迎使用更新功能:\033[0m"
|
||||
echo -----------------------------------------------
|
||||
|
|
|
@ -1119,7 +1119,7 @@ bfstart(){
|
|||
$0 webget $bindir/clash "$update_url/bin/$clashcore/clash-linux-$cpucore"
|
||||
#校验内核
|
||||
chmod +x $bindir/clash 2>/dev/null
|
||||
clashv=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
|
||||
clashv=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
|
||||
if [ -z "$clashv" ];then
|
||||
rm -rf $bindir/clash
|
||||
logger "核心下载失败,请重新运行或更换安装源!" 31
|
||||
|
|
Loading…
Reference in New Issue
Block a user