Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9136359

Browse filesBrowse files
jbergstroemjasnell
authored andcommitted
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: #3200 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent d4fc6d9 commit 9136359
Copy full SHA for 9136359

File tree

Expand file treeCollapse file tree

1 file changed

+11
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-1
lines changed
Open diff view settings
Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ intl_optgroup.add_option('--download',
296296
dest='download_list',
297297
help=nodedownload.help())
298298

299+
intl_optgroup.add_option('--download-path',
300+
action='store',
301+
dest='download_path',
302+
default=os.path.join(root_dir, 'deps'),
303+
help='Download directory [default: %default]')
304+
299305
parser.add_option_group(intl_optgroup)
300306

301307
parser.add_option('--with-perfctr',
@@ -844,11 +850,15 @@ def configure_intl(o):
844850
]
845851
def icu_download(path):
846852
# download ICU, if needed
853+
if not os.access(options.download_path, os.W_OK):
854+
print 'Error: cannot write to desired download path. ' \
855+
'Either create it or verify permissions.'
856+
sys.exit(1)
847857
for icu in icus:
848858
url = icu['url']
849859
md5 = icu['md5']
850860
local = url.split('/')[-1]
851-
targetfile = os.path.join(root_dir, 'deps', local)
861+
targetfile = os.path.join(options.download_path, local)
852862
if not os.path.isfile(targetfile):
853863
if nodedownload.candownload(auto_downloads, "icu"):
854864
nodedownload.retrievefile(url, targetfile)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.