Combine find with -delete for empty directories
This commit is contained in:
parent
a6c7ab818a
commit
75eb9e804c
1 changed files with 1 additions and 3 deletions
|
@ -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}"
|
||||||
|
|
Loading…
Reference in a new issue