Skip to content

Commit

Permalink
feat: update shell sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hehaoxiang committed Aug 13, 2022
1 parent b0577f2 commit 44b1862
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

folder="/Applications/Notion.app/Contents/Resources/app/renderer"
preloadJs="/Applications/Notion.app/Contents/Resources/app/renderer/preload.js"
remoteUrl="https://greasyfork.org/scripts/430116-notion-zh-cn-notion%E7%9A%84%E6%B1%89%E5%8C%96%E8%84%9A%E6%9C%AC/code/Notion-zh_CN%20notion%E7%9A%84%E6%B1%89%E5%8C%96%E8%84%9A%E6%9C%AC.user.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 44b1862

Please sign in to comment.