Fix work_dir path handling: support absolute paths in run_before_squashfs.sh

This commit is contained in:
2026-06-11 18:53:36 +02:00
parent c4a5776e33
commit 75ebd39d93
+6 -1
View File
@@ -27,7 +27,12 @@ COUNTRY="$(get_country)"
# all path must be in quotation marks "path/to/file/or/folder" for now.
arch_chroot() {
arch-chroot "${script_path}/${work_dir}/x86_64/airootfs" /bin/bash -c "${1}"
local airootfs
case "${work_dir}" in
/*) airootfs="${work_dir}/x86_64/airootfs" ;;
*) airootfs="${script_path}/${work_dir}/x86_64/airootfs" ;;
esac
arch-chroot "${airootfs}" /bin/bash -c "${1}"
}
do_merge() {