mirror of
https://github.com/facebook/zstd.git
synced 2025-10-09 00:05:28 -04:00
improve tar compatibility
This patch is supposed to improve compatibility with less featured tar variants "when the tar program used does not support historical options (without hyphen) nor the '-z' option." Patch proposed by Antonio Diaz Diaz
This commit is contained in:
parent
0b0b62d1cf
commit
61afa154cd
@ -1285,7 +1285,7 @@ println "\n===> tar extension tests "
|
|||||||
rm -f tmp tmp.tar tmp.tzst tmp.tgz tmp.txz tmp.tlz4 tmp1.zstd
|
rm -f tmp tmp.tar tmp.tzst tmp.tgz tmp.txz tmp.tlz4 tmp1.zstd
|
||||||
|
|
||||||
datagen > tmp
|
datagen > tmp
|
||||||
tar cf tmp.tar tmp
|
tar -cf tmp.tar tmp
|
||||||
zstd tmp.tar -o tmp.tzst
|
zstd tmp.tar -o tmp.tzst
|
||||||
rm -f tmp.tar
|
rm -f tmp.tar
|
||||||
zstd -d tmp.tzst
|
zstd -d tmp.tzst
|
||||||
@ -1293,21 +1293,21 @@ zstd -d tmp.tzst
|
|||||||
rm -f tmp.tar tmp.tzst
|
rm -f tmp.tar tmp.tzst
|
||||||
|
|
||||||
if [ $GZIPMODE -eq 1 ]; then
|
if [ $GZIPMODE -eq 1 ]; then
|
||||||
tar czf tmp.tgz tmp
|
tar -c tmp | gzip > tmp.tgz
|
||||||
zstd -d tmp.tgz
|
zstd -d tmp.tgz
|
||||||
[ -e tmp.tar ] || die ".tgz failed to decompress to .tar!"
|
[ -e tmp.tar ] || die ".tgz failed to decompress to .tar!"
|
||||||
rm -f tmp.tar tmp.tgz
|
rm -f tmp.tar tmp.tgz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $LZMAMODE -eq 1 ]; then
|
if [ $LZMAMODE -eq 1 ]; then
|
||||||
tar c tmp | zstd --format=xz > tmp.txz
|
tar -c tmp | zstd --format=xz > tmp.txz
|
||||||
zstd -d tmp.txz
|
zstd -d tmp.txz
|
||||||
[ -e tmp.tar ] || die ".txz failed to decompress to .tar!"
|
[ -e tmp.tar ] || die ".txz failed to decompress to .tar!"
|
||||||
rm -f tmp.tar tmp.txz
|
rm -f tmp.tar tmp.txz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $LZ4MODE -eq 1 ]; then
|
if [ $LZ4MODE -eq 1 ]; then
|
||||||
tar c tmp | zstd --format=lz4 > tmp.tlz4
|
tar -c tmp | zstd --format=lz4 > tmp.tlz4
|
||||||
zstd -d tmp.tlz4
|
zstd -d tmp.tlz4
|
||||||
[ -e tmp.tar ] || die ".tlz4 failed to decompress to .tar!"
|
[ -e tmp.tar ] || die ".tlz4 failed to decompress to .tar!"
|
||||||
rm -f tmp.tar tmp.tlz4
|
rm -f tmp.tar tmp.tlz4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user