-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgetAllLibsInfo.py
43 lines (36 loc) · 1.06 KB
/
getAllLibsInfo.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
43
#!/usr/bin/env python3
# AnalyzeLibs.py
import progSpec
import os
import subprocess
import buildAndroid
import errno
import shutil
from progSpec import cdlog, cdErr
libPaths = []
##################################################
def runCMD(myCMD):
currentDirectory = currentWD = os.getcwd()
pipe = subprocess.Popen(myCMD, cwd=currentDirectory, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = pipe.communicate()
if out:
print(" Result: ",out)
if err:
print("\n", err)
exit(1)
return [out, err]
def connectLibraries():
global libPaths
for filename in libPaths:
runCMD("python3 getLibInfo.py "+filename+"")
def collectLibFilenamesFromFolder(folderPath):
global libPaths
for filename in os.listdir(folderPath):
if filename.endswith("Lib.dog"):
libPaths.append(os.path.join(folderPath, filename))
def analyzeAllLibs():
global libPaths
collectLibFilenamesFromFolder("LIBS/")
connectLibraries()
analyzeAllLibs()
runCMD("python3 AnalyzeLibInfo.py ")