Remove redundant cache mount
This commit is contained in:
1 parent
b423f7481d
commit
22988b2f3b
1 file changed
+3
-7
@@ -38,17 +38,13 @@ if [ -d "/var/cache/pacman/pkg" ]; then
|
|||||||
DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg")
|
DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount persistent cache for offline mirror packages to avoid re-downloading
|
# Mount the build cache directory where packages are downloaded
|
||||||
OFFLINE_CACHE_DIR="$HOME/.cache/omarchy-offline-mirror"
|
|
||||||
mkdir -p "$OFFLINE_CACHE_DIR"
|
|
||||||
DOCKER_ARGS+=(-v "$OFFLINE_CACHE_DIR:/var/cache/omarchy")
|
|
||||||
|
|
||||||
# Also mount the build cache directory where packages are initially downloaded
|
|
||||||
# using a dated dir on the host to refresh daily if building multiple times
|
# using a dated dir on the host to refresh daily if building multiple times
|
||||||
BUILD_DATE=$(date +%Y-%m-%d)
|
BUILD_DATE=$(date +%Y-%m-%d)
|
||||||
BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
|
BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
|
||||||
mkdir -p "$BUILD_CACHE_DIR"
|
mkdir -p "$BUILD_CACHE_DIR"
|
||||||
DOCKER_ARGS+=(-v "$BUILD_CACHE_DIR:/root/.cache/omarchy/iso/airootfs/var/cache/omarchy")
|
# Mount to /var/cache/airootfs/var/cache/omarchy since that's where packages go in the ISO
|
||||||
|
DOCKER_ARGS+=(-v "$BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy")
|
||||||
|
|
||||||
# Run the builder with assembled args
|
# Run the builder with assembled args
|
||||||
docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT
|
docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT
|
||||||
|
|||||||
Reference in new issue
Block a user