Skip to content

Commit

Permalink
fix runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
cnsilvan committed Sep 21, 2020
1 parent a132f6e commit f6e9d2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

## 前言

> 该插件 1.10 版本之后支持核心库自动更新,该功能目前处于测试中,希望积极反馈
1. 有问题,请开issues,有空会修复(我更希望有人pr)

2. 可能会和lede或其他openwrt固件自带的UnblockNeteaseMusic插件冲突(编译界面找不到该插件),编译前移除其他插件(包括依赖库)

## 编译与升级

> 该插件 1.10 版本之后支持核心库自动更新,该功能目前处于测试中,希望积极反馈
编译分两个ipk,需要一并安装。

如果只需要升级UnblockNeteaseMusic依赖包,可以直接从[UnblockNeteaseMusic](https://github.com/cnsilvan/UnblockNeteaseMusic/releases)中下载对应的版本解压到/usr/bin/下 ,且赋予运行权限
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ end


local currentTagCMD="UnblockNeteaseMusic -v |grep Version|awk '{print $2}'"
local currentRuntimeCMD="UnblockNeteaseMusic -v | grep runtime|awk -F\( '{print $2}'|awk '{print $3,$4}'|sed -E 's/\)//g'"
local currentRuntimeCMD="UnblockNeteaseMusic -v |grep runtime|awk -F\\( '{print $2}'|awk '{print $3,$4}'|sed -E 's/\)//g'|sed 's/[ \t]*$//g'"

function excute_cmd(cmd)
local t = io.popen(cmd)
local ret = t:read("*all")
local ret = t:read("*all")
t:close()
return ret
end
function currentVersion()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ "$(uci get unblockneteasemusic.@unblockneteasemusic[0].auto_update)" == "1"
exit 1
fi
currentTagCMD="$(UnblockNeteaseMusic -v | grep Version | awk '{print $2}')"
currentRuntimeCMD="$(UnblockNeteaseMusic -v | grep runtime|awk -F\( '{print $2}'|awk '{print $3,$4}'|sed -E 's/\)//g')"
currentRuntimeCMD="$(UnblockNeteaseMusic -v | grep runtime | awk -F\( '{print $2}' | awk '{print $3,$4}' | sed -E 's/\)//g'| sed 's/[ \t]*$//g')"
latestTagCMD="$(cat ${json_file} | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/')"
GOOSS="$(echo $currentRuntimeCMD | awk '{print $1}')"
GOOS="linux"
Expand Down

0 comments on commit f6e9d2a

Please sign in to comment.