From 7443f5c9c53f35a40614b782ec11b1183721003b Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 1 Jan 2013 14:39:41 +0100 Subject: [PATCH] empty build/ and dev/ before building oxjs --- tools/build/build.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 '._']