This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
evolution-packages/common/hooks/post-install/03-remove-empty-dirs.sh

11 lines
318 B
Bash
Raw Normal View History

2023-08-05 21:19:04 +01:00
# This hooks removes empty dirs and warns about them.
hook() {
if [ -d "${PKGDESTDIR}" ]; then
find "${PKGDESTDIR}" -mindepth 1 -type d -empty -print -delete|sort -r|while read f; do
_dir="${f##${PKGDESTDIR}}"
msg_warn "$pkgver: removed empty dir: ${_dir}\n"
done
fi
}