1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/bin/sh
cd $(dirname $0)
testname=$(basename $0)
rm -f $testname.log
mkdir run$testname && cd run$testname || { echo "ERROR: Could not change to test directory" ; exit 1; } >&2
tar -xf ../subdirdata.tar.gz || { echo "ERROR: Could not extract data test files" ; exit 1; } >&2
mkdir source1 && mv subdir1 subdir2 source1
cd source1
banner="create par2files on subdir"
dashes=`echo "$banner" | sed s/./-/g`
echo $dashes
echo $banner
echo $dashes
../../../par2 c -R testdata.par2 * > ../../$testname.log || { echo "ERROR: construction of files using PAR 2.0 failed" ; exit 1; } >&2
cd ..
mv source1 source2
cd source2
banner="verify par2files on subdir, moved source folder"
dashes=`echo "$banner" | sed s/./-/g`
echo $dashes
echo $banner
echo $dashes
../../../par2 v testdata.par2 >> ../../$testname.log || { echo "ERROR: verification of files using PAR 2.0 failed" ; exit 1; } >&2
cd ../..
rm -rf run$testname
exit 0;
|