🚧 insure that word_dir is safe to delete

This commit is contained in:
Vladislav Nepogodin committed 2022-07-13 00:51:21 +04:00
1 parent b77f7dbc70
commit 3645e87430
2 files changed
+5 -5

No files matched your search

+1 -3
View File
@@ -20,13 +20,11 @@ umount_img() {
check_umount() {
if mountpoint -q "$1"; then
sudo umount -l "$1"
sudo umount "$1"
fi
}
umount_fs(){
FS_ACTIVE_MOUNTS=()
if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]]; then
info "overlayfs umount: [%s]" "${FS_ACTIVE_MOUNTS[@]}"
#umount "${FS_ACTIVE_MOUNTS[@]}"
+4 -2
View File
@@ -92,11 +92,12 @@ run_build() {
if $clean_first; then
msg2 "Deleting the build folder if one exists - takes some time"
umount_fs
[ -d ${work_dir} ] && sudo rm -rf ${work_dir}
fi
msg2 "Copying the Archiso folder to build work"
mkdir ${work_dir}
mkdir -p ${work_dir}
cp -r archiso ${work_dir}/archiso
msg "Start [Build ISO]"
@@ -107,11 +108,12 @@ run_build() {
sudo chown $USER $outFolder
cp ${work_dir}/iso/arch/pkglist.x86_64.txt $outFolder/$(gen_iso_fn).pkgs.txt
mv $outFolder/"cachyos-$(date +%Y.%m.%d)-x86_64.iso" $outFolder/${iso_file}
mv "$outFolder/$_profile/cachyos-$(date +%Y.%m.%d)-x86_64.iso" $outFolder/${iso_file}
msg "Done [Build ISO] ${iso_file}"
msg "Finished building [%s]" "${_profile}"
cd "$outFolder/$_profile"
for f in $(find . -maxdepth 1 -name '*.iso' | cut -d'/' -f2); do
if [[ ! -e $f.sha256 ]]; then
create_chksums $f