diff --git a/tools/js2asar.py b/tools/js2asar.py index 9d501be69bc5..a17212419e1d 100755 --- a/tools/js2asar.py +++ b/tools/js2asar.py @@ -19,6 +19,7 @@ def main(): call_asar(archive, output_dir) shutil.rmtree(output_dir) + def copy_js(js_source_files, output_dir): for source_file in js_source_files: output_filename = os.path.splitext(source_file)[0] + '.js' @@ -26,6 +27,7 @@ def copy_js(js_source_files, output_dir): safe_mkdir(os.path.dirname(output_path)) shutil.copy2(source_file, output_path) + def call_asar(archive, output_dir): js_dir = os.path.join(output_dir, 'atom') asar = os.path.join(SOURCE_ROOT, 'node_modules', 'asar', 'bin', 'asar') @@ -45,6 +47,7 @@ def find_node(): return full_path return 'node' + def safe_mkdir(path): try: os.makedirs(path)