From 4cf9e7eac9dd12114becc11513c211abe2c603db Mon Sep 17 00:00:00 2001 From: mudler Date: Wed, 24 Jun 2015 22:26:45 +0200 Subject: [PATCH] [script/post-upgrade] adding FILES_TO_REMOVE array to allow cleaning at the end of the execution --- script/post-upgrade.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/script/post-upgrade.sh b/script/post-upgrade.sh index a1096b3..2f62f6d 100644 --- a/script/post-upgrade.sh +++ b/script/post-upgrade.sh @@ -76,6 +76,14 @@ PACKAGES_TO_REMOVE=( "app-portage/gentoopm" ) +FILES_TO_REMOVE=( + "/.viminfo" + "/.history" + "/.zcompdump" + "/var/log/emerge.log" + "/var/lib/layman"" +) + PACKAGES_TO_ADD=( "app-eselect/eselect-bzimage" "app-text/pastebunz" @@ -141,6 +149,9 @@ rm -rf /post-upgrade.sh # Cleaning portage metadata cache rm -rf /usr/portage/metadata/md5-cache/* rm -rf /var/log/emerge/* -rm -rf /var/log/entropy/** +rm -rf /var/log/entropy/* rm -rf /root/* /root/.* rm -rf /etc/zsh + +# Cleanup +rm -rf "${FILES_TO_REMOVE[@]}"