Skip to content

Commit

Permalink
github仓库更新添加默认
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhh committed Jun 3, 2021
1 parent 55c63ff commit c8769dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions shell/test.sh
Original file line number Diff line number Diff line change
@@ -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\//}"
2 changes: 1 addition & 1 deletion shell/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit c8769dc

Please sign in to comment.