From a19b258880ea8fb1b956046def98b37f07c957b1 Mon Sep 17 00:00:00 2001 From: wukongdaily <2666180@gmail.com> Date: Sun, 12 May 2024 11:18:48 +0800 Subject: [PATCH] Update op.sh --- zero3/op.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zero3/op.sh b/zero3/op.sh index c3c4b06..3523323 100644 --- a/zero3/op.sh +++ b/zero3/op.sh @@ -131,12 +131,17 @@ get_docker_compose_url() { platform="docker-compose-linux-aarch64" fi local repo_path=$(echo "$releases_url" | sed -n 's|https://github.com/\(.*\)/releases/latest|\1|p') - docker_compose_download_url="https://github.com/${repo_path}/releases/download/${tag}/${platform}" + if [[ $(curl -s ipinfo.io/country) == "CN" ]]; then + docker_compose_download_url="https://cafe.cpolar.cn/wkdaily/docker-compose/raw/branch/main/${platform}" + else + docker_compose_download_url="https://github.com/${repo_path}/releases/download/${tag}/${platform}" + fi echo "$docker_compose_download_url" } # 下载并安装Docker Compose do_install_docker_compose() { + # https://github.com/docker/compose/releases/download/v2.26.0/docker-compose-linux-aarch64 # 检查/usr/bin/docker是否存在并且可执行 if [ -f "/usr/bin/docker" ] && [ -x "/usr/bin/docker" ]; then