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

Unified Diff: chrome/browser/resources/unpack_pak.py

Issue 2726403003: WebUI: Split unpack_pak functionality to its own GN action. (Closed)
Patch Set: Rebase Created 3 years, 9 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
Index: chrome/browser/resources/unpack_pak.py
diff --git a/chrome/browser/resources/unpack_pak.py b/chrome/browser/resources/unpack_pak.py
index ce6a993f7ed4edcee9bf2c6710e53ec626c0b99c..0a75b43e12ff8627b20139aa4a9984a9702afd3f 100755
--- a/chrome/browser/resources/unpack_pak.py
+++ b/chrome/browser/resources/unpack_pak.py
@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import argparse
import os
import re
import sys
@@ -51,3 +52,14 @@ def unpack(pak_path, out_path):
os.makedirs(dirname)
with open(os.path.join(out_path, filename), 'w') as file:
file.write(text)
+
Dan Beam 2017/03/10 00:10:32 \n\n
dpapad 2017/03/10 01:42:31 Done.
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--pak_file')
+ parser.add_argument('--out_folder')
+ args = parser.parse_args()
+
+ unpack(args.pak_file, args.out_folder)
+
Dan Beam 2017/03/10 00:10:32 \n\n
dpapad 2017/03/10 01:42:31 Done.
+if __name__ == '__main__':
+ main()

Powered by Google App Engine
This is Rietveld 408576698