1adf3a377e
The pypi element is cool, but some folk have local network mirrors which we should permit them to use. Change-Id: Ie840ad1184e72b0e01966eee0298cfd6511b6c19
14 lines
368 B
Bash
Executable file
14 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
|