-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·41 lines (35 loc) · 976 Bytes
/
configure
File metadata and controls
executable file
·41 lines (35 loc) · 976 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
#!/usr/bin/python2
import sys
import os.path
import shutil
locale="/usr/local/bro2csv"
# Primary Directory
if not os.path.isdir(locale):
try:
os.mkdir(locale, 0755);
except Exception,e:
print str(e)
sys.exit(1)
# Directory for temp files
if not os.path.isdir("%s/tmp" % locale):
try:
os.umask(0)
os.mkdir("%s/tmp" % locale, 0777);
except Exception,e:
print str(e)
sys.exit(1)
try:
shutil.copy2("bro2csv",locale)
shutil.copy2("header.py",locale)
except Exception,e:
print str(e)
sys.exit(1)
if not os.path.isfile("/usr/bin/bro2csv"):
try:
os.symlink("%s/bro2csv" % locale, "/usr/bin/bro2csv")
except Exception,e:
print str(e)
sys.exit(1)
print "bro2csv is now installed"
print "Current version of bro2csv:"
os.system("bro2csv -v")