summaryrefslogtreecommitdiff
path: root/tools/js2c.py
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-03-13 18:31:04 -0700
committerNathan Rajlich <nathan@tootallnate.net>2012-03-15 17:12:37 -0700
commitbea2e15864fb41c161dd47a0184ae07e83b7ce76 (patch)
tree24cb87e837ee9cdfc9be4e4d53c06abc82748a71 /tools/js2c.py
parentc7b8073afc018901a106564aaf6819b170a9538a (diff)
downloadandroid-node-v8-bea2e15864fb41c161dd47a0184ae07e83b7ce76.tar.gz
android-node-v8-bea2e15864fb41c161dd47a0184ae07e83b7ce76.tar.bz2
android-node-v8-bea2e15864fb41c161dd47a0184ae07e83b7ce76.zip
js2c: fix to support files other than ones ending with 2 char extensions
Previously this was basically hard-coded for *.js files, but now we need to include the 'config.gypi' file in there as well.
Diffstat (limited to 'tools/js2c.py')
-rwxr-xr-xtools/js2c.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/js2c.py b/tools/js2c.py
index fd8b25b1a4..69ec8a83c4 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -288,7 +288,7 @@ def JS2C(source, target):
lines = ExpandMacros(lines, macros)
lines = CompressScript(lines, do_jsmin)
data = ToCArray(s, lines)
- id = (os.path.split(str(s))[1])[:-3]
+ id = os.path.basename(str(s)).split('.')[0]
if delay: id = id[:-6]
if delay:
delay_ids.append((id, len(lines)))