From cf1cbdffafef76f3347da54f65f9398efac170dd Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 18 Apr 2015 12:31:55 +0200 Subject: [PATCH] avoid missing files during oxjs build --- tools/build/build.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/build/build.py b/tools/build/build.py index bc94b023..cb66d952 100755 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -35,8 +35,8 @@ def build_oxjs(downloads=False, geo=False): root_path = '../../' source_path = root_path + 'source/' - dev_path = root_path + 'dev/' - min_path = root_path + 'min/' + dev_path = root_path + 'dev.tmp/' + min_path = root_path + 'min.tmp/' locales = {} version = get_version() @@ -298,7 +298,15 @@ def build_oxjs(downloads=False, geo=False): build_path = root_path + 'build/' if os.path.exists(build_path) and not os.path.islink(build_path[:-1]): shutil.rmtree(build_path) - write_link('min', build_path[:-1]) + write_link('min', build_path[:-1]) + real_dev_path = root_path + 'dev/' + real_min_path = root_path + 'min/' + if os.path.exists(real_dev_path): + shutil.rmtree(real_dev_path) + shutil.move(dev_path,real_dev_path) + if os.path.exists(real_min_path): + shutil.rmtree(real_min_path) + shutil.move(min_path,real_min_path) def copy_file(source, target):