aboutsummaryrefslogtreecommitdiff
path: root/tools/file2json.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-13 15:00:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-13 15:00:30 -0700
commitfe00c08a453ecd805835525f13c0180bda8eeec3 (patch)
tree6f715dacc5f9d3728885fdd28728db84559f576d /tools/file2json.py
parent4cc863f41354edf309cab860a1f925e8d8725d3d (diff)
file tool fixes
Diffstat (limited to 'tools/file2json.py')
-rw-r--r--tools/file2json.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/file2json.py b/tools/file2json.py
index 65547e72..a1c37244 100644
--- a/tools/file2json.py
+++ b/tools/file2json.py
@@ -22,5 +22,9 @@ while len(sdata) > 0:
if len(sdata) > 0:
lined += ['\n']
json = '[' + ''.join(lined) + ']'
-print json
+
+if len(sys.argv) < 3:
+ print json
+else:
+ print 'var ' + sys.argv[2] + '=' + json + ';'