mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-21 14:17:11 +08:00
fix: optimize repo clone in run.sh
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,6 +37,7 @@ client_config.json
|
|||||||
ref/
|
ref/
|
||||||
.cursor/
|
.cursor/
|
||||||
local/
|
local/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
# cow cli
|
# cow cli
|
||||||
dist/
|
dist/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=68.0"]
|
requires = ["setuptools>=45.0"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
|
|||||||
7
run.sh
7
run.sh
@@ -171,8 +171,11 @@ clone_project() {
|
|||||||
mv chatgpt-on-wechat-master chatgpt-on-wechat
|
mv chatgpt-on-wechat-master chatgpt-on-wechat
|
||||||
rm chatgpt-on-wechat.zip
|
rm chatgpt-on-wechat.zip
|
||||||
else
|
else
|
||||||
git clone https://github.com/zhayujie/chatgpt-on-wechat.git || \
|
GIT_HTTP_CONNECT_TIMEOUT=10 GIT_HTTP_LOW_SPEED_LIMIT=1024 GIT_HTTP_LOW_SPEED_TIME=15 \
|
||||||
git clone https://gitee.com/zhayujie/chatgpt-on-wechat.git
|
git clone --depth 10 --progress https://github.com/zhayujie/chatgpt-on-wechat.git || {
|
||||||
|
echo -e "${YELLOW}⚠️ GitHub is slow, switching to Gitee mirror...${NC}"
|
||||||
|
git clone --depth 10 --progress https://gitee.com/zhayujie/chatgpt-on-wechat.git
|
||||||
|
}
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo -e "${RED}❌ Project clone failed. Please check network connection.${NC}"
|
echo -e "${RED}❌ Project clone failed. Please check network connection.${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user