patch to make build.py run under linux
Closed this issue · 0 comments
JohnDenker commented
This patch makes build.py work for me under linux.
The code should be self-explanatory.
commit 112273fce1ea8b015931e5df5fcc401d483b6a39
Author: John Denker <jsd@av8n.com>
Date: Tue Sep 8 11:17:26 2015 -0700
fix so that it works on linux (at least on my system)
diff --git a/build.py b/build.py
index 5f2a741..af91483 100644
--- a/build.py
+++ b/build.py
@@ -94,7 +94,11 @@ def minify(inlibs, inlibs_nomin, outlib):
if True: # minify if True
env = os.environ.copy()
env["NODE_PATH"] = "build-tools/UglifyJS"
- uglify = subprocess.Popen( "build-tools/node.exe build-tools/UglifyJS/bin/uglifyjs",
+ nodeprog = '/usr/bin/nodejs' # linux
+ if not os.path.isfile(nodeprog):
+ nodeprog = './build-tools/node.exe' # windows
+ uglify = subprocess.Popen([nodeprog,
+ "build-tools/UglifyJS/bin/uglifyjs"],
stdin=subprocess.PIPE,
stdout=outf,
env=env