From fdfa3a203a9f89e8f43e4c38d5c6c236e662d269 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 7 Jun 2018 13:28:36 +0200 Subject: [PATCH] tools: add option to use custom template with js2c.py --- tools/js2c.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/js2c.py b/tools/js2c.py index 8685722c13cdc5..38cf39f81677dd 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -330,6 +330,10 @@ def JS2C(source, target): def main(): natives = sys.argv[1] source_files = sys.argv[2:] + if source_files[-2] == '-t': + global TEMPLATE + TEMPLATE = source_files[-1] + source_files = source_files[:-2] JS2C(source_files, [natives]) if __name__ == "__main__":