-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch.sh
executable file
·40 lines (35 loc) · 686 Bytes
/
patch.sh
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
resultfile='result.txt'
testdir='testdir'
outcome='outcome'
if test -d ${outcome}
then
rm -rf ${outcome}/
mkdir ${outcome}
echo Remove old outcome files...
else
mkdir ${outcome}
echo Make outcome dir...
fi
if test -d ${testdir}
then
pass
else
mkdir ${testdir}
echo Make testdir...
fi
if test -f ${resultfile}
then
rm ${resultfile}
touch ${resultfile}
echo Remove old results...
else
touch ${resultfile}
echo Make results log file...
fi
echo Start analyzing...
spatch -cocci_file test.cocci -D count=0 -dir ${testdir}
#--disable-worth-trying-opt
echo Finished analyzing.
python copy_files.py
echo Result log: ${resultfile}.
echo Source files copied to: ${outcome}\