👑 优化更新方式 by 一只瓜 | 🍉
This commit is contained in:
parent
68ce61ca23
commit
8ff775fa89
@ -73,9 +73,13 @@ async def update(context):
|
|||||||
await context.edit('找到更新,正在拉取 . . .')
|
await context.edit('找到更新,正在拉取 . . .')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
upstream_remote.pull(active_branch)
|
# upstream_remote.pull(active_branch)
|
||||||
await execute("pip3 install -r requirements.txt --upgrade")
|
await execute("""git status | grep modified | sed -r "s/ +/ /" | cut -f2 | awk -F " " '{print "mkdir -p $(dirname ../for-update/" $2 ") && mv " $2 " ../for-update/" $2}' | sh""")
|
||||||
await execute("pip3 install -r requirements.txt")
|
await execute("git pull")
|
||||||
|
await execute("""cd ../for-update/ && find -H . -type f | awk '{print "cp " $1 " ../PagerMaid-Modify/" $1}' | sh && cd ../PagerMaid-Modify""")
|
||||||
|
await execute("rm -rf ../for-update/")
|
||||||
|
await execute("python3 -m pip install -r requirements.txt --upgrade")
|
||||||
|
await execute("python3 -m pip install -r requirements.txt")
|
||||||
await log("PagerMaid-Modify 已更新。")
|
await log("PagerMaid-Modify 已更新。")
|
||||||
await context.edit(
|
await context.edit(
|
||||||
'更新成功,PagerMaid-Modify 正在重新启动。'
|
'更新成功,PagerMaid-Modify 正在重新启动。'
|
||||||
|
Loading…
Reference in New Issue
Block a user