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

13 lines
267 B
Plaintext
Raw Normal View History

#!/bin/bash
set -eu
set -o pipefail
MIRROR_SOURCE=~/.cache/image-create/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