rustup: make gc time an env var

This commit is contained in:
Zenithal 2022-12-20 11:47:05 +08:00
parent 4e9822c03b
commit deb2c85056

View File

@ -5,7 +5,8 @@ cd "$TUNASYNC_WORKING_DIR"
echo "rustup sync started"
BASE_URL=${MIRROR_BASE_URL:-"https://mirrors.tuna.tsinghua.edu.cn/rustup"}
GC=${RUSTUP_GC:-"30"}
/usr/local/cargo/bin/rustup-mirror -u "${BASE_URL}" -m "${TUNASYNC_WORKING_DIR}" --gc 30
/usr/local/cargo/bin/rustup-mirror -u "${BASE_URL}" -m "${TUNASYNC_WORKING_DIR}" --gc "${GC}"
echo "finished"