Implement building ISO in RAM and automatic removal of build directory (#67)

* feat: Implement building ISO in RAM

* feat: Implement removing build directory

* README: Remove build directory by default

* Use mktemp to create work directory

Co-authored-by: Vasiliy Stelmachenok <92667539+ventureoo@users.noreply.github.com>

* Adapt cehcks for mktemp

* util-iso.sh: Fix typo

Co-authored-by: Vasiliy Stelmachenok <92667539+ventureoo@users.noreply.github.com>

* util-iso.sh: Ensure safe removal of directory by quoting variable

Co-authored-by: Vasiliy Stelmachenok <92667539+ventureoo@users.noreply.github.com>

* util-iso.sh: umount_fs first and then start removal

* util-iso.sh: Properly handle removal of work directory

---------

Co-authored-by: Vasiliy Stelmachenok <92667539+ventureoo@users.noreply.github.com>
This commit is contained in:
veuxitandVasiliy Stelmachenok authored and GitHub committed 2025-11-20 10:13:41 +01:00
1 parent 2a25ad08d6
commit 94480e21a8
4 files changed
+26 -3

No files matched your search

+10
View File
@@ -212,6 +212,16 @@ run_build() {
fi
done
show_elapsed_time "${FUNCNAME}" "${timer_start}"
if [[ "$build_in_ram" == "true" && "$remove_build_dir" == "false" ]]; then
msg "!!! Remember to remove $work_dir !!!"
msg2 "sudo rm -rf $work_dir"
fi
if [[ "$remove_build_dir" == "true" ]]; then
msg "Automatically removing build directory ($work_dir)..."
umount_fs
[ -d ${work_dir} ] && sudo rm -rf ${work_dir}
msg2 "Removed"
fi
}
gen_iso_fn(){