Skip to content

Commit

Permalink
feat: 补充从github中更新客户端脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
Reamd7 committed Sep 5, 2023
1 parent af10bb0 commit bafc51b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions update_github.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
export ALL_PROXY="http://127.0.0.1:7890"

folder="/Applications/Notion.app/Contents/Resources/app/renderer"
preloadJs="/Applications/Notion.app/Contents/Resources/app/renderer/preload.js"
remoteUrl="https://raw.githubusercontent.com/Reamd7/notion-zh_CN/main/notion-zh_CN.js"

if [ -w "/Applications/Notion.app/Contents/Resources/app/renderer/preload.js" ]; then
curl -# -o "$folder/Notion-zh_CN.js" "$remoteUrl"

listLine="tail -n 1 $preloadJs"
if [ "$($listLine)" != "require('./Notion-zh_CN')" ]; then
echo "require('./Notion-zh_CN')" >> $preloadJs
fi
fi

0 comments on commit bafc51b

Please sign in to comment.