hooks/remote-empty-dirs: switch back to my version that really works.

I'm not sure how the guy that submitted the PR tested it, but IT
DOES NOT WORK AS HE EXPECTED.
This commit is contained in:
Juan RP 2015-04-26 09:46:02 +02:00
parent 5078a553a3
commit f4019408ca

View file

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