2
0
mirror of https://github.com/vasi/pixz synced 2024-10-30 15:21:41 +00:00
pixz/test/single-file-round-trip.sh
2018-02-19 18:56:43 +00:00

15 lines
281 B
Bash
Executable File

#!/bin/sh
PIXZ=../src/pixz
INPUT=$(basename $0)
COMPRESSED=$INPUT.xz
UNCOMPRESSED=$INPUT.extracted
trap "rm -f $COMPRESSED $UNCOMPRESSED" EXIT
$PIXZ $INPUT $COMPRESSED
$PIXZ -d $COMPRESSED $UNCOMPRESSED
[ "$(cat $INPUT | md5sum)" = "$(cat $UNCOMPRESSED | md5sum)" ] || exit 1