tazpkg rev 933

modules/install: provide special informational mode activated by --quiet --cookmode
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jan 12 03:18:20 2017 +0200 (2017-01-12)
parents d08b638af430
children c5370edd8f0e
files modules/install
line diff
     1.1 --- a/modules/install	Tue Jan 10 13:20:08 2017 +0200
     1.2 +++ b/modules/install	Thu Jan 12 03:18:20 2017 +0200
     1.3 @@ -342,6 +342,16 @@
     1.4  	# TODO: why this list-processed in the $PKGS_DB?
     1.5  	#[ -n "$INSTALL_LIST" ] && echo "$PACKAGE_FILE" >> "$PKGS_DB/$INSTALL_LIST-processed"
     1.6  
     1.7 +	# Special mode for using in cookutils: clear show whether used fresh package or cached one
     1.8 +	if [ -n "$cookmode" ]; then
     1.9 +		f=${PACKAGE_FILE%/*}; f=${f%/*}; f=${f##*/}
    1.10 +		if [ "$f" == "$(cat /etc/slitaz-release)" ]; then
    1.11 +			_ 'Installing (web/cache): %s' "$(basename $PACKAGE_FILE .tazpkg)"
    1.12 +		else
    1.13 +			_ 'Installing (pkg/local): %s' "$(basename $PACKAGE_FILE .tazpkg)"
    1.14 +		fi
    1.15 +	fi
    1.16 +
    1.17  	if [ -n "$sequence" ]; then
    1.18  		title 'Installation of package "%s" (%s)' "$PACKAGE" "$sequence"
    1.19  	else