empty build/ and dev/ before building oxjs

This commit is contained in:
rolux 2013-01-01 14:39:41 +01:00
parent 6f10d4ee7f
commit 7443f5c9c5

View file

@ -29,6 +29,17 @@ def build_oxjs(downloads=False, geo=False):
year = time.strftime('%Y', time.gmtime())
comment = ' OxJS %s (c) %s 0x2620, dual-licensed GPL/MIT, see https://oxjs.org for details ' % (version, year)
# Empty build and dev
for path in [build_path, dev_path]:
if os.path.exists(path):
for item in os.listdir(path):
full_path = '%s%s' % (path, item)
if os.path.isdir(full_path):
if not (geo == False and item == 'Ox.Geo'):
shutil.rmtree(full_path)
else:
os.remove(full_path)
# Ox.UI Theme Data
theme_data = {}
themes = [dirname for dirname in os.listdir(source_path + 'Ox.UI/themes/') if not dirname[0] in '._']