wok diff xz/stuff/lzma @ rev 5144

smbclient: lib files move to samba-common + Fix DEPENDS
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Mar 23 23:24:39 2010 +0100 (2010-03-23)
parents a2da616d3e4f
children 6a8dae495834
line diff
     1.1 --- a/xz/stuff/lzma	Wed Feb 03 22:37:34 2010 +0100
     1.2 +++ b/xz/stuff/lzma	Tue Mar 23 23:24:39 2010 +0100
     1.3 @@ -66,7 +66,7 @@
     1.4  		shift
     1.5  	done
     1.6  	for i in $files; do
     1.7 -		xz $args $i || break
     1.8 +		xz $args $i || exit
     1.9  		[ "lzma" == "$suffix" ] || mv ${i%.*}.lzma ${i%.*}.$suffix
    1.10  	done
    1.11  	exit
    1.12 @@ -101,4 +101,16 @@
    1.13  done
    1.14  
    1.15  # fake lzma_alone (-eos -mt1)
    1.16 -eval exec xz $args --format=lzma --$mode$extra --stdout $input $output
    1.17 +eval xz $args --format=lzma --$mode$extra --stdout $input $output
    1.18 +status=$?
    1.19 +if [ -n "$input" -a -n "$output" ]; then
    1.20 +	size=$(stat -c "%s" ${input#< })
    1.21 +	ascii="00000 "
    1.22 +	for i in 1 2 3 4 5 6 7 8; do
    1.23 +		ascii="$ascii $(printf "%02x" $((size % 256)) )"
    1.24 +		size=$(( $size / 256 ))
    1.25 +	done
    1.26 +	echo "$ascii | .." | hexdump -R | \
    1.27 +	dd of=${output#> } seek=5 bs=1 conv=notrunc 2> /dev/null
    1.28 +fi
    1.29 +exit $status