From 2b05c2c376428810c09b33e5562d6082934fadad Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Mon, 19 Aug 2024 14:55:51 +0800 Subject: [PATCH] pypi_shadowmire: fix config generation Signed-off-by: Harry Chen --- pypi_shadowmire.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pypi_shadowmire.sh b/pypi_shadowmire.sh index 40bfdbc..e45f66b 100755 --- a/pypi_shadowmire.sh +++ b/pypi_shadowmire.sh @@ -24,7 +24,12 @@ echo "Syncing to $REPO" DOWNLOAD_MIRROR="" if [[ $TUNASYNC_UPSTREAM != $PYPI_MASTER ]]; then # see https://github.com/pypa/bandersnatch/pull/928 for more info - DOWNLOAD_MIRROR="shadowmire_upstream = ${TUNASYNC_UPSTREAM}" + DOWNLOAD_MIRROR="shadowmire_upstream = \"${TUNASYNC_UPSTREAM}\"" +fi + +USE_PYPI_INDEX="" +if [[ $SHADOWMIRE_USE_PYPI_INDEX == "1" ]]; then + USE_PYPI_INDEX="use_pypi_index = true" fi ( @@ -33,7 +38,7 @@ cat << EOF repo = "${REPO}" sync_packages = true ${DOWNLOAD_MIRROR} -use_pypi_index = true +${USE_PYPI_INDEX} exclude = [ ".+-nightly(-|$)", EOF