diff --git a/tools/build/build.py b/tools/build/build.py index 0c9fb599..51851a04 100755 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -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 '._']