Fix warning "rm: cannot remove `/var/cache/genkernel/src': Is a directory" (bug #347213)

cleanup-cruft
Sebastian Pipping 14 years ago
parent 8b7a16e07a
commit 5a7012ced6

@ -250,13 +250,11 @@ setup_cache_dir()
if [ "${CLEAR_CACHE_DIR}" == 'yes' ] if [ "${CLEAR_CACHE_DIR}" == 'yes' ]
then then
print_info 1 "Clearing cache dir contents from ${CACHE_DIR}" print_info 1 "Clearing cache dir contents from ${CACHE_DIR}"
CACHE_DIR_CONTENTS=`ls ${CACHE_DIR}|grep -v CVS|grep -v cpio|grep -v README` while read i
for i in ${CACHE_DIR_CONTENTS}
do do
print_info 1 " >> removing ${i}" print_info 1 " >> removing ${i}"
rm ${CACHE_DIR}/${i} rm "${i}"
done done < <(find "${CACHE_DIR}" -maxdepth 1 -type f -name '*.tar.*')
fi fi
} }

Loading…
Cancel
Save