mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复首次拉区repo cdn无效
This commit is contained in:
parent
603dc07581
commit
d6f5198893
|
@ -152,11 +152,12 @@ update_repo() {
|
|||
local repo_path="${dir_repo}/${author}_${repo}"
|
||||
[[ $branch ]] && repo_path="${repo_path}_${branch}"
|
||||
|
||||
local formatUrl="${github_proxy_url}${url/https:\/\/ghproxy.com\//}"
|
||||
if [ -d ${repo_path}/.git ]; then
|
||||
reset_romote_url ${repo_path} "${github_proxy_url}${url/https:\/\/ghproxy.com\//}" "${branch}"
|
||||
reset_romote_url ${repo_path} "${formatUrl}" "${branch}"
|
||||
git_pull_scripts ${repo_path} "${branch}"
|
||||
else
|
||||
git_clone_scripts ${url} ${repo_path} "${branch}"
|
||||
git_clone_scripts "${formatUrl}" ${repo_path} "${branch}"
|
||||
fi
|
||||
if [[ $exit_status -eq 0 ]]; then
|
||||
echo -e "\n更新${repo_path}成功...\n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user