2013-08-09 13:13:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2014-02-19 01:03:56 +00:00
|
|
|
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
|
2013-08-09 13:13:15 +00:00
|
|
|
MIRROR_SOURCE=~/.cache/image-create/pypi/mirror/
|
|
|
|
MIRROR_TARGET=$TMP_MOUNT_PATH/tmp/pypi
|
|
|
|
|
2014-02-06 14:09:32 +00:00
|
|
|
sudo mkdir -p $MIRROR_SOURCE $MIRROR_TARGET
|
2013-08-09 13:13:15 +00:00
|
|
|
sudo mount --bind $MIRROR_SOURCE $TMP_MOUNT_PATH/tmp/pypi
|