Combine find with -delete for empty directories

This commit is contained in:
0x1eef 2024-04-15 15:22:49 -03:00
parent a6c7ab818a
commit 75eb9e804c

View file

@ -20,9 +20,7 @@ perform_update()
parent=$(dirname "${target}") parent=$(dirname "${target}")
echo "rm ${target}" echo "rm ${target}"
rm -f "${target}" rm -f "${target}"
if [ -e "${parent}" ]; then find "${parent}" -type d -maxdepth 0 -empty -delete
find "${parent}" -type d -maxdepth 0 -empty -exec rm -rf {} \;
fi
done done
for file in ${add}; do for file in ${add}; do
target="${installdir}/${file}" target="${installdir}/${file}"