ea3f4dd459
ensure 4 spaces indentation is used everywhere. Change-Id: Ieb48faacb4c96b7b358771d70c17f2f22d0354f4
16 lines
388 B
Bash
Executable File
16 lines
388 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
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
|