purge_distfiles.sh: remove empty directories

This commit is contained in:
Jürgen Buchmüller 2015-09-23 15:12:28 +02:00
parent 52149d192e
commit 482acee672
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ purge_distfiles() {
[ -n "${my_hashes[$hash]}" ] && continue
inode=$(stat "$file" --printf "%i")
echo "Obsolete $hash (inode: $inode)"
( IFS="|"; for f in ${inodes[$inode]}; do rm -v "$f"; done )
( IFS="|"; for f in ${inodes[$inode]}; do rm -v "$f"; rmdir ${f#/*} 2>/dev/null; done )
done
echo "Done."
}