mirror of
https://github.com/xHyroM/void-packages.git
synced 2024-11-25 15:41:04 +01:00
11 lines
321 B
Bash
11 lines
321 B
Bash
|
# 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 -r f; do
|
||
|
_dir="${f##${PKGDESTDIR}}"
|
||
|
msg_warn "$pkgver: removed empty dir: ${_dir}\n"
|
||
|
done
|
||
|
fi
|
||
|
}
|