fix(pi-gen): resolve files/ from sub-stage dir, not BASE_DIR

\${BASE_DIR} is pi-gen's own checkout (/pi-gen), not the path of the
custom stage. Resolve files/ relative to the script's own location.
This commit is contained in:
Mitchell R 2026-05-20 02:57:41 +02:00
parent 04d40adb93
commit 4e652c6fd1
No known key found for this signature in database

View file

@ -1,8 +1,9 @@
#!/bin/bash -e
# Host-side (runs outside chroot, before 01-run-chroot.sh). Stages every
# file from the sub-stage's files/ dir into the chroot at /tmp/bf-files
# so the chroot script can install them. Files dir is populated by CI
# (build.yml's "Stage files for pi-gen" step).
# Host-side (runs outside chroot, before 01-run-chroot.sh). Pi-gen sets
# cwd to the sub-stage directory and exposes ROOTFS_DIR. Bulk-copy this
# sub-stage's files/ into the chroot at /tmp/bf-files so 01-run-chroot.sh
# can install them. files/ is populated by CI (build.yml's "Stage files
# for pi-gen" step).
SUB_STAGE_DIR="$(cd "$(dirname "$0")" && pwd)"
install -d "${ROOTFS_DIR}/tmp/bf-files"
cp -r "${BASE_DIR}/stage-betterframe-client/01-install-kiosk/files/." \
"${ROOTFS_DIR}/tmp/bf-files/"
cp -r "${SUB_STAGE_DIR}/files/." "${ROOTFS_DIR}/tmp/bf-files/"