diff --git a/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh b/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh index 92ab34c..140a1ee 100755 --- a/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh +++ b/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh @@ -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/"