logo
0
0
WeChat Login

GScore 仓库镜像同步工具

一键替换或还原 gsuid_core 及其插件的 git remote URL,在 GitHub 和镜像源之间切换。

  • replace.sh / replace.ps1 - 将远程 URL 从 GitHub 替换为镜像源
  • revert.sh / revert.ps1 - 将远程 URL 从镜像源还原为 GitHub 原始地址

支持的镜像源:

注意:脚本使用 POSIX sh 编写,兼容 bash、dash、zsh 等所有主流 shell。

目录结构

gsuid_core/ ← 在此目录执行脚本 ├── gsuid_core/ │ └── plugins/ ← 插件目录 │ ├── XutheringWavesUID/ │ ├── GenshinUID/ │ └── ...其他插件 └── ...其他文件

替换git镜像(加速访问)

GitCode 镜像

Linux/macOS

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

Windows

PowerShell 一键执行
powershell -ExecutionPolicy ByPass -c { $env:MIRROR = 'gitcode' irm https://raw.gitcode.com/gscore-mirror/script/raw/main/replace.ps1 | iex }

CNB 镜像

Linux/macOS

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

Windows

PowerShell 一键执行
powershell -ExecutionPolicy ByPass -c { $env:MIRROR = 'cnb' irm https://cnb.cool/gscore-mirror/script/-/git/raw/main/replace.ps1 | iex }

还原为 GitHub 原始地址

GitCode 镜像

Linux/macOS

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

Windows

# PowerShell 一键执行 powershell -ExecutionPolicy ByPass -c { irm https://raw.gitcode.com/gscore-mirror/script/raw/main/revert.ps1 | iex }

CNB 镜像

Linux/macOS

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

Windows

PowerShell 一键执行
powershell -ExecutionPolicy ByPass -c { irm https://cnb.cool/gscore-mirror/script/-/git/raw/main/revert.ps1 | iex }

支持的插件

插件名GitHub 原始地址GitCode 镜像地址CNB 镜像地址
gsuid_corehttps://github.com/Genshin-bots/gsuid_corehttps://gitcode.com/gscore-mirror/gsuid_corehttps://cnb.cool/gscore-mirror/gsuid_core
XutheringWavesUIDhttps://github.com/Loping151/XutheringWavesUIDhttps://gitcode.com/gscore-mirror/XutheringWavesUIDhttps://cnb.cool/gscore-mirror/XutheringWavesUID
RoverSignhttps://github.com/tyql688/RoverSignhttps://gitcode.com/gscore-mirror/RoverSignhttps://cnb.cool/gscore-mirror/RoverSign
DNAUIDhttps://github.com/tyql688/DNAUIDhttps://gitcode.com/gscore-mirror/DNAUIDhttps://cnb.cool/gscore-mirror/DNAUID
GenshinUIDhttps://github.com/KimigaiiWuyi/GenshinUIDhttps://gitcode.com/gscore-mirror/GenshinUIDhttps://cnb.cool/gscore-mirror/GenshinUID
StarRailUIDhttps://github.com/baiqwerdvd/StarRailUIDhttps://gitcode.com/gscore-mirror/StarRailUIDhttps://cnb.cool/gscore-mirror/StarRailUID
ZZZeroUIDhttps://github.com/ZZZure/ZZZeroUIDhttps://gitcode.com/gscore-mirror/ZZZeroUIDhttps://cnb.cool/gscore-mirror/ZZZeroUID
DeltaUIDhttps://github.com/Agnes4m/DeltaUIDhttps://gitcode.com/gscore-mirror/DeltaUIDhttps://cnb.cool/gscore-mirror/DeltaUID
SayuStockhttps://github.com/KimigaiiWuyi/SayuStockhttps://gitcode.com/gscore-mirror/SayuStockhttps://cnb.cool/gscore-mirror/SayuStock
BlueArchiveUIDhttps://github.com/KimigaiiWuyi/BlueArchiveUIDhttps://gitcode.com/gscore-mirror/BlueArchiveUIDhttps://cnb.cool/gscore-mirror/BlueArchiveUID
VAUIDhttps://github.com/Agnes4m/VAUIDhttps://gitcode.com/gscore-mirror/VAUIDhttps://cnb.cool/gscore-mirror/VAUID
MajsoulUIDhttps://github.com/KimigaiiWuyi/MajsoulUIDhttps://gitcode.com/gscore-mirror/MajsoulUIDhttps://cnb.cool/gscore-mirror/MajsoulUID
WzryUIDhttps://github.com/KimigaiiWuyi/WzryUIDhttps://gitcode.com/gscore-mirror/WzryUIDhttps://cnb.cool/gscore-mirror/WzryUID
LOLegendsUIDhttps://github.com/KimigaiiWuyi/LOLegendsUIDhttps://gitcode.com/gscore-mirror/LOLegendsUIDhttps://cnb.cool/gscore-mirror/LOLegendsUID
CS2UIDhttps://github.com/Agnes4m/CS2UIDhttps://gitcode.com/gscore-mirror/CS2UIDhttps://cnb.cool/gscore-mirror/CS2UID
ScoreEchohttps://github.com/Loping151/ScoreEchohttps://gitcode.com/gscore-mirror/ScoreEchohttps://cnb.cool/gscore-mirror/ScoreEcho
TodayEchohttps://github.com/Loping151/TodayEchohttps://gitcode.com/gscore-mirror/TodayEchohttps://cnb.cool/gscore-mirror/TodayEcho
BeyondUIDhttps://github.com/baiqwerdvd/BeyondUIDhttps://gitcode.com/gscore-mirror/BeyondUIDhttps://cnb.cool/gscore-mirror/BeyondUID
EndUIDhttps://github.com/Loping151/EndUIDhttps://gitcode.com/gscore-mirror/EndUIDhttps://cnb.cool/gscore-mirror/EndUID

注意事项

  • gsuid_core 根目录执行脚本(包含 .git 目录的目录)
  • 确保插件已通过 git clone 下载
  • 脚本只会修改 remote URL,不会下载或删除文件
  • 脚本具有幂等性,重复执行是安全的
  • 如果当前 URL 已是目标地址,脚本会跳过并标记为成功

手动操作

手动替换为镜像地址

如果需要手动替换某个插件的 remote URL,以 XutheringWavesUID 为例:

使用 GitCode 镜像 (gitcode.com)

# 替换 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

使用 CNB 镜像 (cnb.cool)

# 替换 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 替换为目标插件名即可。

About

No description, topics, or website provided.
Language
Shell53.1%
Others46.9%