xbps-src: fix handling of path names containing spaces

This commit is contained in:
jbu 2015-04-27 10:22:18 +02:00
parent f9a3e8058d
commit 5b066f3564

View file

@ -1,7 +1,8 @@
# This hooks removes empty dirs and warns about them.
hook() {
for f in $(find ${PKGDESTDIR} -type d -empty|sort -r); do
for f in $(find ${PKGDESTDIR} -type d -empty|sort -r|tr " " "|"); do
f="${f//|/ }"
_dir="${f##${PKGDESTDIR}}"
[ -z "${_dir}" ] && continue
rmdir --ignore-fail-on-non-empty -p "$f" &>/dev/null