[molecules/arm-base] fix paths removal logic

This commit is contained in:
Fabio Erculiani 2012-02-01 11:36:22 +01:00
parent fd95125bf6
commit c7efe90982
2 changed files with 3 additions and 7 deletions

View File

@ -60,7 +60,7 @@ release_string: Sabayon Linux
# Directories to remove completely (comma separated)
paths_to_remove:
/var/lib/entropy/client/database/*/sabayonlinux.org,
/var/lib/entropy/client/database/*/sabayon*,
/root/.subversion,
/lib/udev-state/devices.tar.bz2,
/var/log/scrollkeeper.log, /var/log/genkernel.log,
@ -79,8 +79,6 @@ paths_to_remove:
/var/lib/entropy/smartapps/*/*,
/var/lib/entropy/smartapps/*/*,
/var/lib/entropy/tmp/*,
/var/lib/entropy/packages*/*,
/var/lib/entropy/client/packages*/*,
/var/tmp/entropy/*,
/*.txt,
/usr/portage/a*,

View File

@ -170,16 +170,14 @@ export LC_ALL=C
# work out paths to empty and paths to remove
if [ -n "${PATHS_TO_REMOVE}" ]; then
for path in $(echo ${PATHS_TO_REMOVE} | tr ";" "\n"); do
path="${tmp_dir}/${path}"
echo "Removing: ${path}"
rm -rf "${path}"
rm -rf "${tmp_dir}"/${path}
done
fi
if [ -n "${PATHS_TO_EMPTY}" ]; then
for path in $(echo ${PATHS_TO_EMPTY} | tr ";" "\n"); do
path="${tmp_dir}/${path}"
echo "Emptying: ${path}"
rm -rf "${path}"/*
rm -rf "${tmp_dir}"/"${path}"/*
done
fi