tazpkg view modules/cache @ rev 846
Remove "busybox" "prefixes" (thanks llev)
We used "busybox wget", etc. to be sure we called Busybox's "wget", not any other "wget". Workaround already done in "getenv" module.
We used "busybox wget", etc. to be sure we called Busybox's "wget", not any other "wget". Workaround already done in "getenv" module.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Oct 09 13:14:01 2015 +0300 (2015-10-09) |
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