一键替换或还原 gsuid_core 及其插件的 git remote URL,在 GitHub 和镜像源之间切换。
支持的镜像源:
注意:脚本使用 POSIX sh 编写,兼容 bash、dash、zsh 等所有主流 shell。
gsuid_core/ ← 在此目录执行脚本 ├── gsuid_core/ │ └── plugins/ ← 插件目录 │ ├── XutheringWavesUID/ │ ├── GenshinUID/ │ └── ...其他插件 └── ...其他文件
wget -qO- https://raw.gitcode.com/gscore-mirror/script/raw/main/replace.sh | sh -s gitcode
curl -LsSf https://raw.gitcode.com/gscore-mirror/script/raw/main/replace.sh | sh -s gitcode
powershell -ExecutionPolicy ByPass -c { $env:MIRROR = 'gitcode' irm https://raw.gitcode.com/gscore-mirror/script/raw/main/replace.ps1 | iex }
wget -qO- https://cnb.cool/gscore-mirror/script/-/git/raw/main/replace.sh | sh -s cnb
curl -LsSf https://cnb.cool/gscore-mirror/script/-/git/raw/main/replace.sh | sh -s cnb
powershell -ExecutionPolicy ByPass -c { $env:MIRROR = 'cnb' irm https://cnb.cool/gscore-mirror/script/-/git/raw/main/replace.ps1 | iex }
wget -qO- https://raw.gitcode.com/gscore-mirror/script/raw/main/revert.sh | sh
curl -LsSf https://raw.gitcode.com/gscore-mirror/script/raw/main/revert.sh | sh
# PowerShell 一键执行 powershell -ExecutionPolicy ByPass -c { irm https://raw.gitcode.com/gscore-mirror/script/raw/main/revert.ps1 | iex }
wget -qO- https://cnb.cool/gscore-mirror/script/-/git/raw/main/revert.sh | sh
curl -LsSf https://cnb.cool/gscore-mirror/script/-/git/raw/main/revert.sh | sh
powershell -ExecutionPolicy ByPass -c { irm https://cnb.cool/gscore-mirror/script/-/git/raw/main/revert.ps1 | iex }
gsuid_core 根目录执行脚本(包含 .git 目录的目录)git clone 下载如果需要手动替换某个插件的 remote URL,以 XutheringWavesUID 为例:
# 替换 gsuid_core 本体
git remote set-url origin https://gitcode.com/gscore-mirror/gsuid_core
# 替换 XutheringWavesUID 插件
cd gsuid_core/plugins/XutheringWavesUID
git remote set-url origin https://gitcode.com/gscore-mirror/XutheringWavesUID
# 查看当前 remote
git remote -v
# 替换 gsuid_core 本体
git remote set-url origin https://cnb.cool/gscore-mirror/gsuid_core
# 替换 XutheringWavesUID 插件
cd gsuid_core/plugins/XutheringWavesUID
git remote set-url origin https://cnb.cool/gscore-mirror/XutheringWavesUID
# 查看当前 remote
git remote -v
# 还原 gsuid_core 本体
git remote set-url origin https://github.com/Genshin-bots/gsuid_core
# 还原 XutheringWavesUID 插件
cd gsuid_core/plugins/XutheringWavesUID
git remote set-url origin https://github.com/Loping151/XutheringWavesUID
# 查看当前 remote
git remote -v
替换其他插件只需将命令中的 XutheringWavesUID 替换为目标插件名即可。