-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFLICK_TEST
More file actions
executable file
·52 lines (46 loc) · 861 Bytes
/
FLICK_TEST
File metadata and controls
executable file
·52 lines (46 loc) · 861 Bytes
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
44
45
46
47
48
49
50
51
52
#!/bin/bash
testDir="./text.compression.corpus/*"
for file in $testDir
do
if [ -f $file ]
then
echo -n "processing" $file
bin/flick $file
if [ $? -eq 0 ]
then
if [ -e $file.flk ]
then
echo
ls -hs $file
ls -hs $file.flk
bin/flick -d $file.flk -o $file.unflk
if [ -e $file.unflk ]
then
cmp $file.unflk $file > /dev/null
if [ $? -eq 0 ]
then
echo -en '\033[0;32m'
echo "success"
else
echo -en '\033[0;31m'
echo "failure"
fi
tput sgr0
rm $file.unflk
else
echo "no unflicked file was produced"
fi
rm $file.flk
else
echo "no flicked file was produced"
fi
else
# flick failed during compression
# check to see if an empty flk file is present
if [ -e $file.flk ]
then
rm $file.flk
fi
fi
fi
done