mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
fix remove cache loop
This commit is contained in:
parent
34f707711d
commit
da12ceaa84
1 changed files with 1 additions and 7 deletions
|
@ -238,14 +238,8 @@ _cleanup_install() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_cleanup_x_cache() {
|
_cleanup_x_cache() {
|
||||||
# get last full package
|
|
||||||
LAST_FULL_PACKAGE="$(grep 'FULL' /etc/archboot/defaults | sed -e 's#^.*\ ##g' -e 's#\"##g')"
|
|
||||||
# installed packages
|
|
||||||
grep 'installed' /var/log/pacman.log | cut -d ' ' -f 4 >/tmp/installed.log
|
|
||||||
# remove all lines above with match
|
|
||||||
sed -i -e "1,/^${LAST_FULL_PACKAGE}$/d" /tmp/installed.log
|
|
||||||
# remove packages from cache
|
# remove packages from cache
|
||||||
while read -r /tmp/installed.log; do
|
for i in $(grep -w 'installed' /var/log/pacman.log | cut -d ' ' -f 4); do
|
||||||
rm -rf /var/cache/pacman/pkg/"${i}"-*
|
rm -rf /var/cache/pacman/pkg/"${i}"-*
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue