1adf3a377e
The pypi element is cool, but some folk have local network mirrors which we should permit them to use. Change-Id: Ie840ad1184e72b0e01966eee0298cfd6511b6c19
15 lines
368 B
Bash
Executable File
15 lines
368 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
PYPI_MIRROR_URL=${PYPI_MIRROR_URL:-''}
|
|
if [ -n "$PYPI_MIRROR_URL" ]; then
|
|
# External mirror URL being used - no need to bind mount anything.
|
|
exit 0
|
|
fi
|
|
MIRROR_SOURCE=~/.cache/image-create/pypi/mirror/
|
|
MIRROR_TARGET=$TMP_MOUNT_PATH/tmp/pypi
|
|
|
|
sudo mkdir -p $MIRROR_SOURCE $MIRROR_TARGET
|
|
sudo mount --bind $MIRROR_SOURCE $TMP_MOUNT_PATH/tmp/pypi
|