Skip to content

Commit

Permalink
Explicitly add -z option to tar(1) during extraction, as
Browse files Browse the repository at this point in the history
not all tar implementations, will handle gzip'ed archives
automatically. This for example helps on OpenBSD.
  • Loading branch information
kucharskim committed Oct 6, 2015
1 parent 86bd576 commit c37f3fc
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions tests/test1
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/flatdata-par1files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata-par1files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

banner="Verifying using PAR 1.0 data"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
4 changes: 2 additions & 2 deletions tests/test10
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/smallsubdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/smallsubdirdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/smallsubdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/smallsubdirdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

banner="Repairing deleted subdir using PAR 2.0 data"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test11
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/100blocks.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/100blocks.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="create par2files using 100 blocks"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test12
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/readbeyondeof.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/readbeyondeof.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="repair files where the filesize got changed"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test13
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="create 5% recovery files"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test14
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="create 5% recovery files"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test15
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/par2-0.6.8-crash.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/par2-0.6.8-crash.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="repair files should succeed, (issue #35)"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test16
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="don't allow files outside par2 basedir, (issue #34, #36)"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test17
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/bug44.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/bug44.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="remove subdir structure and repair, see #44"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
4 changes: 2 additions & 2 deletions tests/test2
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/flatdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

banner="Verifying using PAR 2.0 data"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
4 changes: 2 additions & 2 deletions tests/test3
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/flatdata-par1files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata-par1files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

cp test-0.data test-0.data.orig
cp test-1.data test-1.data.orig
Expand Down
4 changes: 2 additions & 2 deletions tests/test4
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/flatdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

cp test-0.data test-0.data.orig
cp test-1.data test-1.data.orig
Expand Down
2 changes: 1 addition & 1 deletion tests/test5
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

banner="Creating 100% PAR 2.0 recovery data"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
4 changes: 2 additions & 2 deletions tests/test6
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/subdirdata-par2files-unix.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata-par2files-unix.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

banner="Repairing two files in subdirs using PAR 2.0 data"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
4 changes: 2 additions & 2 deletions tests/test7
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/subdirdata-par2files-win.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata-par2files-win.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

banner="Repairing two files in subdirs using PAR 2.0 data generated on windows"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
2 changes: 1 addition & 1 deletion tests/test8
Expand Up @@ -9,7 +9,7 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2

mkdir source1 && mv subdir1 subdir2 source1

Expand Down
4 changes: 2 additions & 2 deletions tests/test9
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/flatdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/flatdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/flatdata-par2files.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

banner="rename using PAR 2.0 data"
dashes=`echo "$banner" | sed s/./-/g`
Expand Down
4 changes: 2 additions & 2 deletions tests/testMem
Expand Up @@ -9,8 +9,8 @@ rm -rf run$testname

mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2

tar -xf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xf $tests/subdirdata-par2files-unix.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
tar -xzf $tests/subdirdata-par2files-unix.tar.gz || { echo "ERROR: Could not extract par test files" ; exit 1; } >&2

rm -f subdir1/test-2.data subdir2/test-7.data
valgrind --tool=memcheck --leak-check=yes ../../par2 r testdata.par2
Expand Down

0 comments on commit c37f3fc

Please sign in to comment.