tazpkg diff modules/pack @ rev 947

modules/get: get_pkg_cookmode(): file may be absent.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jun 05 22:36:04 2017 +0300 (2017-06-05)
parents a02e36d44d06
children 4802158453e1
line diff
     1.1 --- a/modules/pack	Fri Aug 28 16:10:34 2015 +0300
     1.2 +++ b/modules/pack	Mon Jun 05 22:36:04 2017 +0300
     1.3 @@ -14,7 +14,10 @@
     1.4  
     1.5  
     1.6  PACKAGE="$1"
     1.7 +TAZPKG_PACK="$2"
     1.8 +
     1.9  cd "$PACKAGE"
    1.10 +
    1.11  if [ ! -f 'receipt' ]; then
    1.12  	_ 'Receipt is missing. Please read the documentation.'
    1.13  	exit 0
    1.14 @@ -65,9 +68,14 @@
    1.15  status
    1.16  
    1.17  action 'Restoring original package tree...'
    1.18 -unlzma < fs.cpio.lzma | cpio -idm --quiet
    1.19 +case "$TAZPKG_PACK" in
    1.20 +	gzip) gzip -d < fs.cpio.gz;;
    1.21 +	*) unlzma < fs.cpio.lzma;;
    1.22 +esac | cpio -idm --quiet
    1.23  status
    1.24 +rm fs.cpio.*
    1.25  
    1.26 -rm fs.cpio.lzma && cd ..
    1.27 +cd ..
    1.28 +
    1.29  footer "$(_ 'Package "%s" compressed successfully.' "$PACKAGE")"
    1.30  _ 'Size: %s' "$(ls -lh "$PACKAGE.tazpkg" | awk '{print $5}')"