Mercurial > hg > graal-compiler
comparison mx/mx_graal.py @ 18733:d7ec30ebb0f2
Properly chmod files modified when creating JDK image
Contributed-by: vladimir.kozlov@oracle.com
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 19 Dec 2014 12:42:00 -0800 |
parents | b56e88144e0a |
children | 750db34c9fe1 |
comparison
equal
deleted
inserted
replaced
18732:d611982fb10e | 18733:d7ec30ebb0f2 |
---|---|
433 | 433 |
434 assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg | 434 assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg |
435 chmodRecursive(jdk, JDK_UNIX_PERMISSIONS_DIR) | 435 chmodRecursive(jdk, JDK_UNIX_PERMISSIONS_DIR) |
436 shutil.move(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), 'original')) | 436 shutil.move(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), 'original')) |
437 | 437 |
438 if mx.get_os() != 'windows': | |
439 os.chmod(jvmCfg, JDK_UNIX_PERMISSIONS_FILE) | |
438 with open(jvmCfg, 'w') as fp: | 440 with open(jvmCfg, 'w') as fp: |
439 for line in jvmCfgLines: | 441 for line in jvmCfgLines: |
440 fp.write(line) | 442 fp.write(line) |
441 | 443 |
442 # patch 'release' file (append graalvm revision) | 444 # patch 'release' file (append graalvm revision) |
445 releaseFileLines = [] | 447 releaseFileLines = [] |
446 with open(releaseFile) as f: | 448 with open(releaseFile) as f: |
447 for line in f: | 449 for line in f: |
448 releaseFileLines.append(line) | 450 releaseFileLines.append(line) |
449 | 451 |
452 if mx.get_os() != 'windows': | |
453 os.chmod(releaseFile, JDK_UNIX_PERMISSIONS_FILE) | |
450 with open(releaseFile, 'w') as fp: | 454 with open(releaseFile, 'w') as fp: |
451 for line in releaseFileLines: | 455 for line in releaseFileLines: |
452 if line.startswith("SOURCE="): | 456 if line.startswith("SOURCE="): |
453 try: | 457 try: |
454 sourceLine = line[0:-2] # remove last char | 458 sourceLine = line[0:-2] # remove last char |