Merge pull request #1410 from pullmoll/master

xbps-src: Fix read loop for empty dirs; closes #1409
This commit is contained in:
Juan RP 2015-04-26 07:29:05 +02:00
commit 85eb3dde1f

View file

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