# HG changeset patch # User Christopher Rogers # Date 1340160073 0 # Node ID abfee2306690ef510a9483fe240ba3d6bd013656 # Parent 58ba62efde6a39d3c3a2496787e8af134111bf7a cook: Updated summary function to be more like in slitaz-tank branch. Summary function now provvided $TARBALL name, source folder size if exist, and source file size. diff -r 58ba62efde6a -r abfee2306690 cook --- a/cook Tue Jun 19 21:18:04 2012 +0000 +++ b/cook Wed Jun 20 02:41:13 2012 +0000 @@ -269,24 +269,29 @@ # Display cooked package summary. summary() { cd $WOK/$pkg - [ -d install ] && prod=$(du -sh install | awk '{print $1}' 2>/dev/null) - fs=$(du -sh taz/* | awk '{print $1}') + [ -d $WOK/$pkg/install ] && prod=$(du -sh $WOK/$pkg/install | awk '{print $1}' 2>/dev/null) + [ -d $WOK/$pkg/source ] && srcdir=$(du -sh $WOK/$pkg/source | awk '{print $1}' 2>/dev/null) + fs=$(du -sh $WOK/$pkg/taz/* | awk '{print $1}') size=$(du -sh $PKGS/$pkg-${VERSION}*.tazpkg | awk '{print $1}') - files=$(cat taz/$pkg-*/files.list | wc -l) + files=$(cat $WOK/$pkg/taz/$pkg-*/files.list | wc -l) + [ "$TARBALL" ] && srcsize=$(du -sh $SRC/$TARBALL | awk '{print $1}') cookdate=$(date "+%Y-%m-%d %H:%M") sec=$time div=$(( ($time + 30) / 60)) [ "$div" != 0 ] && min="~ ${div}m" gettext "Summary for:"; echo " $PACKAGE $VERSION" separator - [ "$prod" ] && echo "Produced : $prod" + [ "$srcdir" ] && echo "Source dir : $srcdir" + [ "$TARBALL" ] && echo "Src file : $TARBALL" + [ "$srcsize" ] && echo "Src size : $srcsize" + [ "$prod" ] && echo "Produced : $prod" cat << EOT -Packed : $fs -Compressed : $size -Files : $files -Cook time : ${sec}s $min -Cook date : $cookdate -Host arch : $ARCH +Packed : $fs +Compressed : $size +Files : $files +Cook time : ${sec}s $min +Cook date : $cookdate +Host arch : $ARCH $(separator) EOT }