forked from ursgal/ursgal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare_resources.py
executable file
·42 lines (35 loc) · 1000 Bytes
/
prepare_resources.py
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
#!/usr/bin/env python3
# encoding: utf-8
import ursgal
import os
import sys
import pprint
def main():
"""
Download all resources from our webpage
"""
uc = ursgal.UController()
zip_files_list, update_kb_list = uc.prepare_resources(root_zip_target_folder="/tmp")
print()
print("<<<Summary>>>")
if len(zip_files_list) == 0:
print("[ INFO ] All files are correctly stored in online repository")
else:
for zip_file, md5 in zip_files_list:
print("[ INFO ] File: {0} was created with md5: {1}".format(zip_file, md5))
print()
print()
if len(update_kb_list) == 0:
print("[ INFO ] No kb information has to be updated")
else:
for engine, message in update_kb_list:
print(
"[ INFO ] Please update kb for {0}".format(
engine,
)
)
print(message)
print()
return
if __name__ == "__main__":
main()