tazpkg view modules/cache @ rev 847

Add 'mkdb' description to 'usage' and English docs. Refresh French translation (thanks Lucas Levrel)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Oct 10 14:52:10 2015 +0300 (2015-10-10)
parents
children 21ac83abe572
line source
1 #!/bin/sh
2 # TazPkg - Tiny autonomous zone packages manager, hg.slitaz.org/tazpkg
3 # cache - TazPkg module
4 # Work with package cache
7 # Connect function libraries
8 . /lib/libtaz.sh
10 # Get TazPkg working environment
11 . @@MODULES@@/getenv
16 case $1 in
17 clean)
18 num=$(find "$CACHE_DIR" -name *.tazpkg | wc -l)
19 size=$(du -hs "$CACHE_DIR" | cut -f1 | sed 's|\.0||')
20 [ "$num" -eq 0 ] && size="0K"
22 title 'Cleaning cache directory...'
23 action 'Path: %s' "$CACHE_DIR"
24 find "$CACHE_DIR" -name '*.tazpkg' -delete
25 status
27 footer "$(_p \
28 '%s file removed from cache (%s).' \
29 '%s files removed from cache (%s).' "$num" \
30 "$(colorize 32 "$num")" "$size")"
31 ;;
32 esac