[llvm] use TUNASYNC_UPSTREAM_URL env

This commit is contained in:
z4yx 2020-04-27 13:24:23 +08:00
parent 633c7116dc
commit 1ade30e85f

View File

@ -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