From 24afe02e8821d798f04e952f362a2dace25c598b Mon Sep 17 00:00:00 2001 From: tcme <546900+thisconnect@users.noreply.github.com> Date: Fri, 31 May 2019 12:01:20 +0200 Subject: [PATCH] Add oldcache to clean target comment text from https://github.com/armbian/build/blob/376c1b05515ab1e459edc2c6d42b38f3c65699d2/config/templates/config-example.conf#L10 --- lib/general.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/general.sh b/lib/general.sh index c90e0f24e7..130aef3f4c 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -26,6 +26,7 @@ # "make" - "make clean" for selected kernel and u-boot # "debs" - delete output/debs # "cache" - delete output/cache +# "oldcache" - remove old output/cache # "images" - delete output/images # "sources" - delete output/sources # @@ -71,7 +72,7 @@ cleaning() [[ -d $SRC/cache/sources ]] && display_alert "Cleaning" "sources" "info" && rm -rf $SRC/cache/sources/* $DEST/buildpkg/* ;; - oldcache) + oldcache) # remove old `cache/rootfs` except for the newest 8 files if [[ -d $SRC/cache/rootfs && $(ls -1 $SRC/cache/rootfs/*.lz4 2> /dev/null | wc -l) -gt ${ROOTFS_CACHE_MAX} ]]; then display_alert "Cleaning" "rootfs cache (old)" "info" (cd $SRC/cache/rootfs; ls -t *.lz4 | sed -e "1,${ROOTFS_CACHE_MAX}d" | xargs -d '\n' rm -f)