Name cache dir appropriately

This commit is contained in:
Ryan Hughes authored and Ryan Hughes committed 2025-09-12 00:48:41 -04:00
1 parent 555be32eb2
commit 3f64ac5656
2 files changed
+38 -44

No files matched your search

+3 -5
View File
@@ -44,13 +44,11 @@ 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
# Use a fixed name to avoid timezone/date mismatch issues between host and container
# using a dated dir on the host to refresh daily if building multiple times
BUILD_DATE=$(date +%Y-%m-%d)
BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy/mirror/offline"
BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
mkdir -p "$BUILD_CACHE_DIR"
# Pass the same date to the container via environment variable
DOCKER_ARGS+=(-e "ISO_BUILD_DATE=${BUILD_DATE}")
DOCKER_ARGS+=(-v "$BUILD_CACHE_DIR:/root/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy/mirror/offline")
DOCKER_ARGS+=(-v "$BUILD_CACHE_DIR:/root/.cache/omarchy/iso/airootfs/var/cache/omarchy")
# Run the builder with assembled args
docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT