tazpkg view modules/cache @ rev 865
Module "install": fix kernel modules update
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Nov 17 18:35:34 2015 +0200 (2015-11-17) |
parents | d6cbd0c5f273 |
children | af67b2269d1f |
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