File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33BANDERSNATCH=${BANDERSNATCH:- " /usr/local/bin/bandersnatch" }
4- TUNASYNC_UPSTREAM=${TUNASYNC_UPSTREAM_URL:- " https://pypi.org/" }
4+ PYPI_MASTER=" https://pypi.org/"
5+ TUNASYNC_UPSTREAM=${TUNASYNC_UPSTREAM_URL:- $PYPI_MASTER }
56CONF=" /tmp/bandersnatch.conf"
67INIT=${INIT:- " 0" }
78
1213
1314echo " Syncing to $TUNASYNC_WORKING_DIR "
1415
16+ DOWNLOAD_MIRROR=" "
17+ if [[ $TUNASYNC_UPSTREAM != $PYPI_MASTER ]]; then
18+ # see https://github.com/pypa/bandersnatch/pull/928 for more info
19+ DOWNLOAD_MIRROR=" download-mirror = ${TUNASYNC_UPSTREAM} "
20+ fi
21+
1522if [[ $INIT == " 0" ]]; then
1623(
1724 cat << EOF
1825[mirror]
1926directory = ${TUNASYNC_WORKING_DIR}
20- master = ${TUNASYNC_UPSTREAM}
27+ master = ${PYPI_MASTER}
28+ ${DOWNLOAD_MIRROR}
2129json = true
2230timeout = 300
2331workers = 5
4755 cat > $CONF << EOF
4856[mirror]
4957directory = ${TUNASYNC_WORKING_DIR}
50- master = ${TUNASYNC_UPSTREAM}
58+ master = ${PYPI_MASTER}
59+ ${DOWNLOAD_MIRROR}
5160json = true
5261timeout = 15
5362workers = 10
You can’t perform that action at this time.
0 commit comments