mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Removing blob file protection during build cleanup.
This commit is contained in:
parent
adb8fefd67
commit
b8d3b5318b
2 changed files with 5 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ else
|
|||
fi
|
||||
|
||||
# Clear out old builds.
|
||||
# Remove immutable attribute from protected files before cleanup
|
||||
chattr -i "${BUILD_DIR}"/chroot/opt/wrolpi-blobs/* 2>/dev/null || :
|
||||
[ -d "${BUILD_DIR}" ] && rm -rf "${BUILD_DIR}"
|
||||
mkdir "${BUILD_DIR}"
|
||||
cd "${BUILD_DIR}" || (echo "Work directory must exist" && exit 1)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ cleanup() {
|
|||
fi
|
||||
done
|
||||
|
||||
# Remove immutable attribute from protected files before cleanup
|
||||
chattr -i "${BUILD_DIR}"/work/*/stage*/rootfs/opt/wrolpi-blobs/* 2>/dev/null || :
|
||||
|
||||
# Final safety net – remove the whole build tree
|
||||
rm -rf "${BUILD_DIR}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue