Commit 7d2812fc authored by apavlov@chromium.org's avatar apavlov@chromium.org

DevTools: Fix non-clean debug_devtools build after r183664

TBR=loislo

Review URL: https://codereview.chromium.org/653133002

git-svn-id: svn://svn.chromium.org/blink/trunk@183677 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 88c1f5da
......@@ -65,6 +65,12 @@ def hardlink_or_copy_dir(src, dest):
shutil.copy(src_name, dest_name)
def safe_copy(src, dest):
if path.exists(dest):
os.remove(dest)
shutil.copy(src, dest)
class AppBuilder:
def __init__(self, application_name, descriptors, application_dir, output_dir):
self.application_name = application_name
......@@ -209,7 +215,8 @@ class DebugBuilder(AppBuilder):
def build_app(self):
self._build_html()
shutil.copy(join(self.application_dir, self.app_file('js')), self.output_dir)
js_name = self.app_file('js')
safe_copy(join(self.application_dir, js_name), join(self.output_dir, js_name))
for module_name in self.descriptors.modules:
module = self.descriptors.modules[module_name]
input_module_dir = join(self.application_dir, module_name)
......@@ -218,7 +225,7 @@ class DebugBuilder(AppBuilder):
def _build_html(self):
html_name = self.app_file('html')
shutil.copy(join(self.application_dir, html_name), join(self.output_dir, html_name))
safe_copy(join(self.application_dir, html_name), join(self.output_dir, html_name))
def build_application(application_name, loader, application_dir, output_dir, release_mode):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment