Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: copy_apprtc.py

Issue 872423002: Adding support for AppRTC closure compiling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webrtc/webrtc.DEPS/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build_apprtc_closure.py ('k') | download_golang.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: copy_apprtc.py
===================================================================
--- copy_apprtc.py (revision 293799)
+++ copy_apprtc.py (working copy)
@@ -10,13 +10,25 @@
understand those symlinks).
"""
+import os
import shutil
+import utils
if __name__ == '__main__':
- web_samples_dir = 'webrtc-samples/samples/web'
- shutil.rmtree('src/out/apprtc', ignore_errors=True)
- shutil.copytree(web_samples_dir + '/content/apprtc',
- 'src/out/apprtc', ignore=shutil.ignore_patterns('.svn'))
- shutil.copyfile(web_samples_dir + '/js/adapter.js',
- 'src/out/apprtc/js/adapter.js')
+ target_dir = os.path.join('src', 'out', 'webrtc-samples')
+ if utils.GetPlatform() is 'win':
+ # Work around the fact that node_modules create ridiculously long paths.
+ # Unfortunately shutil will choke on those on Windows, but not rmdir.
+ os.system('rmdir /s /q %s' % target_dir)
+ else:
+ shutil.rmtree(target_dir, ignore_errors=True)
+ shutil.copytree('webrtc-samples',
+ target_dir, ignore=shutil.ignore_patterns('.svn', '.git'))
+ apprtc_subdir = os.path.join('samples', 'web', 'content', 'apprtc')
+
+ # This file is symlinked on windows, so copy it since win doesn't understand
+ # symlinks.
+ shutil.copyfile(os.path.join('webrtc-samples', 'samples', 'web',
+ 'js', 'adapter.js'),
+ os.path.join(target_dir, apprtc_subdir, 'js', 'adapter.js'))
« no previous file with comments | « build_apprtc_closure.py ('k') | download_golang.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698