Clean up the cache directory, if no files are present.

The folder 'cache/contents.chroot' in the build directory can be removed
if no firmware is installed.
This commit is contained in:
Roland Clobus 2022-01-17 18:40:28 +01:00
parent cb912308c7
commit fd1505414b
No known key found for this signature in database
GPG Key ID: 62C57C6AA61495BD
1 changed files with 5 additions and 0 deletions

View File

@ -57,5 +57,10 @@ Firmware_List_From_Contents () {
rm -f "${CONTENTS_FILE}"
fi
done
# Clean up the cache directory, if no files are present
rmdir --ignore-fail-on-non-empty "cache/contents.chroot/${DISTRO_CHROOT}/${_ARCHIVE_AREA}"
rmdir --ignore-fail-on-non-empty "cache/contents.chroot/${DISTRO_CHROOT}"
rmdir --ignore-fail-on-non-empty "cache/contents.chroot"
done
}