Skip to content

Commit

Permalink
Merge pull request #372 from RikudouPatrickstar/pr
Browse files Browse the repository at this point in the history
适配 meta 内核的两行版本信息
  • Loading branch information
juewuy authored Apr 14, 2023
2 parents f24e796 + d6eb83a commit fb11f42
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_meta.alpha_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_meta_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/getdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb11f42

Please sign in to comment.