2013-08-09 13:13:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu
|
2014-04-03 02:24:15 +00:00
|
|
|
set -o pipefail
|
2013-08-09 13:13:15 +00:00
|
|
|
|
2014-02-19 01:03:56 +00:00
|
|
|
PYPI_MIRROR_URL=${PYPI_MIRROR_URL:-''}
|
|
|
|
if [ -n "$PYPI_MIRROR_URL" ]; then
|
2014-05-02 17:02:38 +00:00
|
|
|
# External mirror URL being used - no need to bind mount anything.
|
|
|
|
exit 0
|
2014-02-19 01:03:56 +00:00
|
|
|
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
|