mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-02 19:55:54 +02:00
convert.py fix
This commit is contained in:
parent
17a662dfde
commit
2df3c26657
1 changed files with 7 additions and 3 deletions
|
@ -64,12 +64,16 @@ def convert2Header(inFile, compress):
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
# delete all files in the 'h' dir, but ignore 'favicon_ico_gz.h'
|
# delete all files in the 'h' dir, but ignore 'favicon_ico_gz.h'
|
||||||
dir = './html/h'
|
dir = 'h'
|
||||||
|
if os.getcwd()[-4:] != "html":
|
||||||
|
dir = "html/" + dir
|
||||||
|
|
||||||
for f in os.listdir(dir):
|
for f in os.listdir(dir):
|
||||||
if not f.startswith('favicon_ico_gz'):
|
if not f.startswith('favicon_ico_gz'):
|
||||||
os.remove(os.path.join(dir, f))
|
os.remove(os.path.join(dir, f))
|
||||||
|
|
||||||
# grab all files with following extensions
|
# grab all files with following extensions
|
||||||
|
if os.getcwd()[-4:] != "html":
|
||||||
os.chdir('./html')
|
os.chdir('./html')
|
||||||
types = ('*.html', '*.css', '*.js') # the tuple of file types
|
types = ('*.html', '*.css', '*.js') # the tuple of file types
|
||||||
files_grabbed = []
|
files_grabbed = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue