2019-02-25 13:12:47 +08:00

8 lines
300 B
Bash
Executable File

#!/bin/bash
set -e
BASE_URL=${MIRROR_BASE_URL:-"https://mirrors.tuna.tsinghua.edu.cn/dart-pub"}
UPSTREAM_URL=${TUNASYNC_UPSTREAM_URL:-"https://pub.dartlang.org/api"}
/pub-cache/bin/pub_mirror --upstream $UPSTREAM_URL --verbose --connections 10 --concurrency 100 "$TUNASYNC_WORKING_DIR" "$BASE_URL"