annotate cpack/dml/scripts/compression/rzp @ 0:718306e29690 tip

commiting public release
author Daniel Wolff
date Tue, 09 Feb 2016 21:05:06 +0100
parents
children
rev   line source
Daniel@0 1 #!/bin/sh
Daniel@0 2 # rzp (encode|decode)
Daniel@0 3 # Use rzip to encode/decode standard input
Daniel@0 4 set -o nounset
Daniel@0 5 set -e
Daniel@0 6 function encode { rzip -9 $1 -o $2 -f; }
Daniel@0 7 function decode { rzip -d $1 -o $2 -f; }
Daniel@0 8 in=`mktemp -t rziXXX`
Daniel@0 9 out=`mktemp -t rzoXXX`
Daniel@0 10 trap "rm -f $in $out; exit" EXIT INT KILL
Daniel@0 11 (cat > $in) && $1 $in $out && cat $out