3 Star 22 Fork 0

Gitee 极速下载/replacegooglecdn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/justjavac/ReplaceGoogleCDN
克隆/下载
release-archive-v3.sh 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
cd ${__DIR__}
mkdir -p ${__DIR__}/var/
mkdir -p ${__DIR__}/dist/
## 打包 chromium 扩展
test -f ${__DIR__}/dist/ReplaceGoogleCDN-v3-chromium.zip && rm -f ${__DIR__}/dist/ReplaceGoogleCDN-v3-chromium.zip
cd ${__DIR__}/
test -d ${__DIR__}/extension/_metadata && rm -rf ${__DIR__}/extension/_metadata
cd ${__DIR__}/extension
# 打包 manifest v3 支持chromium 内核系列
zip -r ${__DIR__}/dist/ReplaceGoogleCDN-v3-chromium.zip . \
-x ".git/*" \
-x ".idea/*" \
-x "_metadata/*" \
-x "node_modules/*" \
-x "tools/*" \
-x "_metadata/*" \
-x "rules/example-advance/*" \
-x "rules/example/*" \
-x "background-page.html" \
-x "screenshot/*" \
-x "test/*" \
-x "web/*" \
-x "web-backup/*" \
-x "manifest-backup.json" \
-x "third_party/highlightjs/*" \
-x "third_party/webrtc/*"
cd ${__DIR__}/
zip -u ${__DIR__}/dist/ReplaceGoogleCDN-v3-chromium.zip ./README.md
zip -u ${__DIR__}/dist/ReplaceGoogleCDN-v3-chromium.zip ./Privacy.md
zip -u ${__DIR__}/dist/ReplaceGoogleCDN-v3-chromium.zip ./LICENSE
## 打包 firefox 扩展
test -f ${__DIR__}/dist/ReplaceGoogleCDN-v3-firefox.zip && rm -f ${__DIR__}/dist/ReplaceGoogleCDN-v3-firefox.zip
mkdir -p ${__DIR__}/var/extension-tmp/rules/
cp -rf ${__DIR__}/extension/rules/*.json ${__DIR__}/var/extension-tmp/rules/
cp -rf ${__DIR__}/extension/icons ${__DIR__}/var/extension-tmp/
rm -f ${__DIR__}/var/extension-tmp/rules/rules_remove_content_security_policy_header_test.json
rm -f ${__DIR__}/var/extension-tmp/rules/rules-default-domains-helper.json
python3 tools/update-v3-manifest.py firefox
cd ${__DIR__}/var/extension-tmp/
zip -r ${__DIR__}/dist/ReplaceGoogleCDN-v3-firefox.zip .
cd ${__DIR__}/
zip -u ${__DIR__}/dist/ReplaceGoogleCDN-v3-firefox.zip ./README.md
zip -u ${__DIR__}/dist/ReplaceGoogleCDN-v3-firefox.zip ./Privacy.md
zip -u ${__DIR__}/dist/ReplaceGoogleCDN-v3-firefox.zip ./LICENSE
# 查看打包结果
cd ${__DIR__}/dist
test -d ReplaceGoogleCDN-v3-chromium && rm -rf ReplaceGoogleCDN-v3-chromium
test -d ReplaceGoogleCDN-v3-firefox && rm -rf ReplaceGoogleCDN-v3-firefox
unzip ReplaceGoogleCDN-v3-chromium.zip -d ReplaceGoogleCDN-v3-chromium
unzip ReplaceGoogleCDN-v3-firefox.zip -d ReplaceGoogleCDN-v3-firefox
cd ${__DIR__}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/replacegooglecdn.git
git@gitee.com:mirrors/replacegooglecdn.git
mirrors
replacegooglecdn
replacegooglecdn
master

搜索帮助