Updated h2inc_gtk.py
This commit is contained in:
@@ -77,6 +77,7 @@ incinc = ''
|
||||
defdir = False
|
||||
defsrc = 'usr/include'
|
||||
defdest = '~'
|
||||
count = 0
|
||||
|
||||
def sourcedir_filecnt(sourcedir):
|
||||
### Return the number of files, ending with '.h', in sourcedir - including subdirectories ###
|
||||
@@ -112,6 +113,7 @@ def sourcedir_foldercnt(sourcedir):
|
||||
return cnt
|
||||
|
||||
def process_file(data):
|
||||
global count
|
||||
outfile = ''
|
||||
inputfile = data
|
||||
encodings = ['utf-8', 'latin-1', 'windows-1250', 'windows-1252', 'ascii',
|
||||
@@ -146,7 +148,8 @@ def process_file(data):
|
||||
fh.close()
|
||||
outputfile = os.path.splitext(inputfile)[0] + '.inc'
|
||||
outputfile = str(outputfile).replace(srcdir, destdir)
|
||||
print(outputfile)
|
||||
count += 1
|
||||
print(str(count)+'->'+outputfile)
|
||||
if not os.path.exists(os.path.dirname(outputfile)):
|
||||
try:
|
||||
os.makedirs(os.path.dirname(outputfile))
|
||||
|
Reference in New Issue
Block a user