diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-07-12 22:34:06 -0400 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-08-30 21:28:29 -0400 |
commit | 4d09c1a7930c80f8edce2bf825a09a11e1ee1cc3 (patch) | |
tree | 04eecdd665fd7bd2d4178dc3406cfaff9fd3258f /emcc | |
parent | 4c3efd2a9a134a15c19ffd232d2e1314b5a64866 (diff) |
Make the compiler output executable scripts if node is being used
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -74,7 +74,7 @@ emcc can be influenced by a few environment variables: EMMAKEN_COMPILER - The compiler to be used, if you don't want the default clang. ''' -import os, sys, shutil, tempfile, subprocess, shlex +import os, sys, shutil, tempfile, subprocess, shlex, stat from subprocess import PIPE, STDOUT from tools import shared from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename @@ -1034,6 +1034,10 @@ try: else: # copy final JS to output shutil.move(final, target) + # Make the target executable if it's a Javascript file + os.chmod(target, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | + stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | + stat.S_IROTH | stat.S_IXOTH) finally: if not TEMP_DIR: |