-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·61 lines (54 loc) · 1.3 KB
/
install.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# This script copies the necessary files
# to parse the EtherNet/IP packets into bro directory.
#
# Precondition:
# -have the bro sources
#
# Usage: ./install </path/to/bro/>
# (please note the last /)
# Then recompile bro (in bro directory)
# # ./configure && make && make install
if [ $# -eq 0 ]
then
echo "You need to specify the Bro installation directory."
echo "Usage: $0 </path/to/bro/>"
exit 1
fi
path=$1
files="scripts/test-all-policy.bro
scripts/base/init-default.bro
src/analyzer/protocol/CMakeLists.txt
README.md
install.sh
"
dirs="
scripts/base/protocols/enip/
scripts/policy/protocols/enip/
src/analyzer/protocol/enip/
testing/btest/scripts/base/protocols/enip/
testing/btest/scripts/policy/protocols/enip/
testing/btest/Baseline/scripts.base.protocols.enip.*/
testing/btest/Baseline/scripts.policy.protocols.enip.*/
testing/btest/Traces/enip/
scripts/base/protocols/cip/
src/analyzer/protocol/cip/
"
for varname in $dirs
do
if [ ! -d $path$varname ]; then
echo "Creating $path$varname"
mkdir -p $path$varname
fi
cpy=$path$varname..
echo "Copying files from $varname"
echo " to $path$varname"
cp -r $varname $cpy
done
for varname in $files
do
cpy=$path$varname
echo "Copying file $varname"
echo " to $path$varname"
cp $varname $cpy
done