github仓库更新添加默认

This commit is contained in:
hanhh 2021-06-03 23:41:40 +08:00
parent 9c1addae69
commit e4f8c58eab
2 changed files with 4 additions and 1 deletions

3
shell/test.sh Normal file
View File

@ -0,0 +1,3 @@
url="https://ghproxy.com/https://github.com/zooPanda/zoo.git"
github_proxy_url="https://ghproxy.com/"
echo "${github_proxy_url}${url/https:\/\/ghproxy.com\//}"

View File

@ -165,7 +165,7 @@ update_repo() {
local repo_path="${dir_repo}/${author}_${repo}"
if [ -d ${repo_path}/.git ]; then
reset_romote_url ${repo_path} ${url}
reset_romote_url ${repo_path} "${github_proxy_url}${url/https:\/\/ghproxy.com\//}"
git_pull_scripts ${repo_path}
else
git_clone_scripts ${url} ${repo_path}