[ cosmetics ]

Suppress error at counting rootfs caches.
This commit is contained in:
Igor Pečovnik 2018-12-20 13:31:13 +01:00 committed by GitHub
parent 5e19d90c04
commit 2563185ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ cleaning()
;;
oldcache)
if [[ -d $SRC/cache/rootfs && $(ls -1 $SRC/cache/rootfs/*.lz4 | wc -l) -gt ${ROOTFS_CACHE_MAX} ]]; then
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)
# Remove signatures if they are present. We use them for internal purpose