diskimage-builder/elements/pypi/extra-data.d/00-mount-pypi-mirror

13 lines
262 B
Text
Raw Normal View History

#!/bin/bash
set -eu
set -o pipefail
MIRROR_SOURCE=$DIB_IMAGE_CACHE/pypi/mirror/
if [ -d "$MIRROR_SOURCE" ]; then
MIRROR_TARGET=$TMP_MOUNT_PATH/tmp/pypi
sudo mkdir -p $MIRROR_SOURCE $MIRROR_TARGET
sudo mount --bind $MIRROR_SOURCE $MIRROR_TARGET
fi