From 1ade30e85f64f2848a9becffe8fa856dda644744 Mon Sep 17 00:00:00 2001 From: z4yx Date: Mon, 27 Apr 2020 13:24:23 +0800 Subject: [PATCH] [llvm] use TUNASYNC_UPSTREAM_URL env --- llvm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm.sh b/llvm.sh index c6e5c2b..c534276 100755 --- a/llvm.sh +++ b/llvm.sh @@ -18,13 +18,14 @@ function repo_update() { echo "==== SYNC $repo_dir DONE ====" } +UPSTREAM_BASE=${TUNASYNC_UPSTREAM_URL:-"https://llvm.org/git"} repos=("llvm" "clang" "libcxx" "lldb" "clang-tools-extra" "polly" "zorg" "compiler-rt" "libcxxabi" "lld" "lnt") total_size=0 for repo in ${repos[@]}; do if [[ ! -d "$TUNASYNC_WORKING_DIR/${repo}.git" ]]; then echo "Initializing ${repo}.git" - repo_init "http://llvm.org/git/${repo}" "$TUNASYNC_WORKING_DIR/${repo}.git" + repo_init "${UPSTREAM_BASE}/${repo}" "$TUNASYNC_WORKING_DIR/${repo}.git" fi repo_update "$TUNASYNC_WORKING_DIR/${repo}.git" done