diff options
author | Johan Bergström <bugs@bergstroem.nu> | 2015-10-06 17:09:06 +1100 |
---|---|---|
committer | Johan Bergström <bugs@bergstroem.nu> | 2015-10-08 22:00:09 +1100 |
commit | a214905ff44dbd986303b89f35a7cefff9f6d9d7 (patch) | |
tree | e43938435f0af7431abda274eaa55fbb2a167a85 /configure | |
parent | 35cdded7449075e6f34d71b3688671d11133cdac (diff) | |
download | node-new-a214905ff44dbd986303b89f35a7cefff9f6d9d7.tar.gz |
build: make icu download path customizable
This makes it easier to store icu tarballs outside of the node.js
directory which is useful in our CI where git directories are
scrubbed between runs.
PR-URL: https://github.com/nodejs/node/pull/3200
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -296,6 +296,12 @@ intl_optgroup.add_option('--download', dest='download_list', help=nodedownload.help()) +intl_optgroup.add_option('--download-path', + action='store', + dest='download_path', + default=os.path.join(root_dir, 'deps'), + help='Download directory [default: %default]') + parser.add_option_group(intl_optgroup) parser.add_option('--with-perfctr', @@ -844,11 +850,15 @@ def configure_intl(o): ] def icu_download(path): # download ICU, if needed + if not os.access(options.download_path, os.W_OK): + print 'Error: cannot write to desired download path. ' \ + 'Either create it or verify permissions.' + sys.exit(1) for icu in icus: url = icu['url'] md5 = icu['md5'] local = url.split('/')[-1] - targetfile = os.path.join(root_dir, 'deps', local) + targetfile = os.path.join(options.download_path, local) if not os.path.isfile(targetfile): if nodedownload.candownload(auto_downloads, "icu"): nodedownload.retrievefile(url, targetfile) |