[molecules/arm-base] fix paths removal logic
This commit is contained in:
parent
fd95125bf6
commit
c7efe90982
@ -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*,
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user